Skip to content

feat: 3ペイン + BOX + たて24行の紙 + 裏写り(チラ裏メタファ) - #11

Merged
bonsai merged 6 commits into
mainfrom
feat-3pane-box-sheet-ura-17472774702638918805
Nov 12, 2026
Merged

bonsai merged 6 commits into
mainfrom
feat-3pane-box-sheet-ura-17472774702638918805

Conversation

@bonsai

@bonsai bonsai commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner
  • Implemented 3-pane TUI layout (BOX, 紙/Sheet, Editor) with Tab/Shift-Tab navigation and contextual arrow key/list navigation.
  • Added BOX configuration support (YAML boxes:) with backward compatibility for single source/db/dir configs, and :box command for config persistence.
  • Added sheet-specific shortcuts (n in BOX/Sheet panes, Ctrl-n/Ctrl-p, ]s/[s).
  • Enforced 24-line limit per sheet in TextBuffer across newlines, open lines, and pasting.
  • Implemented bleed-through ("裏写り") effect default ON, toggleable via :set ura and :set noura, rendering previous sheet content on current empty lines.
  • Updated README and comprehensive unit tests.

Fixes #1


PR created automatically by Jules for task 17472774702638918805 started by @bonsai

Summary by Sourcery

Introduce a three-pane notebook interface with configurable BOX sources, fixed 24-line sheets, and optional previous-sheet bleed-through.

New Features:

  • Add a three-pane BOX, sheet, and editor interface with pane navigation and sheet/box selection shortcuts.
  • Support multiple configurable BOX sources with persistent creation commands while retaining legacy single-source configuration compatibility.
  • Add configurable bleed-through rendering from the previous sheet and controls to enable or disable it.

Bug Fixes:

  • Prevent sheets from exceeding the 24-line editing limit across loading, insertion, opening lines, and pasting.

Enhancements:

  • Update the editor and status display to expose sheet limits, active BOX state, and bleed-through status.

Documentation:

  • Document the three-pane workflow, BOX configuration, 24-line sheets, bleed-through behavior, and related commands and shortcuts.

Tests:

  • Add coverage for pane navigation, bleed-through toggling, 24-line enforcement, BOX configuration parsing, and configuration persistence.

Co-authored-by: bonsai <24775+bonsai@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-11T10:07:07.098360Z
We couldn’t complete this review. Comment @codex review to try again.
f3beeb8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4fb40560-bedc-49bc-8e2f-c1a5c25aca70
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@sourcery-ai

sourcery-ai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Sorry @bonsai, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 15 hours and 51 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Data structures

Define the 24-line sheet limit and enforce it when loading text, inserting lines, and pasting so buffer contents cannot exceed the sheet size.

  • src/buffer.rs L55-60, L347-350, L425-434 (+3 small edits)

Add the pane type and App state for BOX selection, pane focus, configuration, and bleed-through; initialize that state from the effective BOX list.

  • src/app.rs L75-82, L112-118, L174-186 (+4 small edits)

API

Extend the configuration API to represent multiple BOX sources, derive a compatible default BOX, and persist newly added BOX entries.

  • src/config.rs L1-29, L48-53, L93-140 (+3 small edits)

Uses of the API

Pass the loaded configuration into App construction so the configured BOX list is available to the running interface.

  • src/main.rs L154

Implementation

Load the previous note's lines for bleed-through and update that cache as notes are opened or created.

  • src/app.rs L194-224 (+3 small edits)

Implement BOX switching, pane navigation, contextual key handling, and the commands for toggling bleed-through and adding BOXes.

  • src/app.rs L527-563, L874-916, L1373-1422 (+4 small edits)

UI

Render the BOX, sheet, and editor panes with focus indicators, fixed sheet rows, and optional previous-sheet bleed-through.

  • src/ui.rs L53-109, L177-207, L245-310 (+13 small edits)

Configuration

Document the multi-BOX YAML configuration and describe the supported BOX, sheet, and bleed-through workflow and commands.

  • README.md L28-45, L56-63, L110-113 (+1 small edits)

Tests

Add tests for the sheet line cap, pane navigation, bleed-through toggling, BOX parsing and persistence, and retain the related existing test context.

  • src/app.rs L2037-2075, L2208
  • src/buffer.rs L549-573
  • src/config.rs L281-324

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

…ura-17472774702638918805

# Conflicts:
#	src/app.rs
#	src/buffer.rs
@sourcery-ai

sourcery-ai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Linked issues

Checked at commit aff077c

#1 feat: 3ペイン + BOX + たて24行の紙 + 裏写り(チラ裏メタファ) · 9 of 10 met

# Requirement Status Notes
1 Show BOX, 紙/Sheet, and Editor in a three-pane layout. ✅ Met
2 Move between panes with Tab and Shift-Tab. ✅ Met
3 Use the arrow keys to select list entries and move in the editor. ✅ Met
4 Use n in the BOX pane to add a box and n in the Sheet pane to create a sheet. ✅ Met
5 Use i to enter insert mode in the editor. ✅ Met
6 Keep :w, :q, :q!, :wq, and :x behavior consistent with the stated vim semantics. ✅ Met
7 Open the next or previous sheet with Ctrl-n/Ctrl-p or the stated alternatives. ✅ Met
8 Keep each sheet to 24 lines and allow opening a new sheet to continue. ✅ Met
9 Support boxes in YAML, persist new boxes, and retain compatibility with single source/db/dir settings. 🟡 Partly met BOX configuration and persistence are implemented, but startup can open a different source from the first configured BOX when the top-level source settings do not match it.
10 Enable bleed-through by default, show previous-sheet text only on empty lines, and allow toggling it with :set ura and :set noura. ✅ Met

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New gaps against the linked issues

Comment thread src/app.rs
Comment on lines +193 to 205
if let Some(pos) = app
.boxes
.iter()
.position(|b| match (&app.source, b.source.as_str()) {
(Source::Db(p), "db") => &b.resolved_path() == p,
(Source::Dir(p), "dir") => &b.resolved_path() == p,
_ => false,
})
{
app.box_index = pos;
}

app.refresh();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · 初期 BOX と読み込み元の不一致

boxes が設定されていても、現在の source と一致する項目が見つからない場合は box_index が 0 のままです。そのため、BOX ペインの選択表示と実際に開いている読み込み元が異なることがあります。

Prompt for AI agents
In `src/app.rs` at lines 193-205:

**初期 BOX と読み込み元の不一致**

boxes が設定されていても、現在の source と一致する項目が見つからない場合は box_index が 0 のままです。そのため、BOX ペインの選択表示と実際に開いている読み込み元が異なることがあります。

From #1:

YAML の boxes 設定を扱い、単一 source / db / dir 設定との後方互換性を保つ

…ura-17472774702638918805

# Conflicts:
#	src/app.rs

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New gaps against the linked issues

Comment thread src/buffer.rs
Comment on lines +58 to +60
if lines.len() > MAX_SHEET_LINES {
lines.truncate(MAX_SHEET_LINES);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High · あふれた内容を保持する

issue は紙からあふれた内容を新しい紙で続けられることを求めていますが、24 行を超える内容はここで切り捨てられます。残りの内容を次の紙に渡す処理がありません。

Prompt for AI agents
In `src/buffer.rs` at lines 58-60:

**あふれた内容を保持する**

issue は紙からあふれた内容を新しい紙で続けられることを求めていますが、24 行を超える内容はここで切り捨てられます。残りの内容を次の紙に渡す処理がありません。

From #1:

紙からあふれた内容を新しい紙で続けられるようにする

@bonsai
bonsai merged commit 7fe5976 into main Nov 12, 2026
5 checks passed
@bonsai
bonsai deleted the feat-3pane-box-sheet-ura-17472774702638918805 branch November 12, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: 3ペイン + BOX + たて24行の紙 + 裏写り(チラ裏メタファ)

1 participant