Skip to content

fix(tui): add spacing between status line and composer#768

Merged
Yeachan-Heo merged 4 commits into
devfrom
issue-758-improve-vertical-spacing-between-status-line
Jun 16, 2026
Merged

fix(tui): add spacing between status line and composer#768
Yeachan-Heo merged 4 commits into
devfrom
issue-758-improve-vertical-spacing-between-status-line

Conversation

@Yeachan-Heo

Copy link
Copy Markdown
Owner

Summary

  • Add one spacer row between the status line and composer/input box.
  • Cover the layout with a focused interactive-mode editor component test.

Verification

  • Local targeted test attempted: bun test packages/coding-agent/test/interactive-mode-editor-component.test.ts and package-scoped variant; local harness failed before assertions due missing workspace dependency/linkage (@gajae-code/agent-core / test harness dependency setup). CI should validate in the PR environment.

Closes #758.


[repo owner's gaebal-gajae (clawdbot) 🦞]

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c497ec61bd

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

this.ui.addChild(this.todoContainer);
this.ui.addChild(this.btwContainer);
this.ui.addChild(this.statusLine); // Main status rail + hook statuses; composer chrome is rendered by the editor.
this.ui.addChild(new Spacer(COMPOSER_STATUS_SPACING_ROWS));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid adding a second composer spacer

In a normal initialized session with no above-editor hook widget, hookWidgetContainerAbove already contributes one blank row (it is initialized with new Spacer(1) and rebuilt with spacerWhenEmpty=true). Adding this separate spacer before that container makes the default layout render two blank rows between the status line and the composer, which contradicts the new test's expected single row and adds more vertical gap than intended.

Useful? React with 👍 / 👎.

});

it("renders one blank row between status line and composer", () => {
const rendered = mode.ui.render(48).map(line => stripVTControlCharacters(line));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Initialize the UI before asserting its layout

This test only constructs new InteractiveMode(...); the UI component tree is populated later in InteractiveMode.init() where the status line, hook container, and editor container are added. With the current setup mode.ui.render(48) renders an empty tree, so both indices stay -1 and the test fails before it can validate composer spacing.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9cd78f3480

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

it("renders one blank row immediately above the composer", async () => {
vi.spyOn(mode.ui, "start").mockImplementation(() => {});

await mode.init();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Disable launch side effects before full init

In environments where gh is installed and authenticated for a user who has not starred the repo, this full init() call uses the default starReminder.enabled=true and startup.quiet=false path to schedule scheduleLaunchStarReminderAfterFirstRender, which can start an async gh check and potentially open a confirm prompt after the test assertions/teardown. This makes the layout unit test depend on developer/CI GitHub CLI state; disable that setting or mock the reminder path before invoking full initialization.

Useful? React with 👍 / 👎.

@Yeachan-Heo

Copy link
Copy Markdown
Owner Author

REQUEST_CHANGES

Blockers:

  1. The change adds a second blank row, not the advertised single spacing row. hookWidgetContainerAbove is initialized with new Spacer(1) and was already rendered directly before editorContainer; this PR inserts another Spacer(COMPOSER_STATUS_SPACING_ROWS) before that container, so the default layout becomes statusLine -> blank spacer -> hookWidgetContainerAbove blank spacer -> composer. That is visible extra vertical whitespace and is not the minimal one-row status/composer gap described by the PR.

  2. The new test locks in the wrong contract. It is named “renders one blank row immediately above the composer”, but it asserts both the newly inserted spacer and the existing empty hook-widget container render [""] as adjacent pre-composer rows. A meaningful regression test should render the relevant layout and assert the intended number of blank rows between the last status-line row and the composer border, including the empty-hook-widget case.

  3. The extra permanent row was added without revisiting editor height budgeting. #computeEditorMaxHeight() still subtracts the same EDITOR_RESERVED_ROWS, so small terminals now have one more fixed row competing with the editor/chat area than the sizing heuristic accounts for.

Verification performed:

  • Inspected exact diff against origin/dev...HEAD.
  • Confirmed base already had hookWidgetContainerAbove.addChild(new Spacer(1)) immediately before editorContainer.
  • Ran bun test packages/coding-agent/test/interactive-mode-editor-component.test.ts after bun install --frozen-lockfile and building the local native addon with bun --cwd=packages/natives run build: 5 pass / 0 fail.

This is not safe to squash-merge until the layout contract is corrected and the test asserts the real rendered spacing instead of the internal child order that currently proves two blank rows.


[repo owner's gaebal-gajae (clawdbot) 🦞]

@Yeachan-Heo

Copy link
Copy Markdown
Owner Author

Addressed the review blockers in c26e7bf.

  • Removed the extra fixed COMPOSER_STATUS_SPACING_ROWS spacer so the composer reuses the existing hookWidgetContainerAbove spacer instead of rendering two blank rows.
  • Updated the focused interactive-mode layout test to assert the visible rendered gap count between the last status row and the composer border for the empty-hook-widget case, rather than locking internal child order.
  • No editor height budget change was needed because no new fixed row is added.

Verification:

  • bun test packages/coding-agent/test/interactive-mode-editor-component.test.ts → 5 pass, 0 fail, 40 expect() calls.


[repo owner's gaebal-gajae (clawdbot) 🦞]

@Yeachan-Heo

Copy link
Copy Markdown
Owner Author

MERGE_READY

Re-reviewed head c26e7bf630ae126415fb858e8e14a3f3c3dfb6ac against origin/dev.

Confirmed:

  • The product diff now only adds the focused test; no runtime layout code is changed relative to origin/dev.
  • The prior blocker is resolved: there is no extra COMPOSER_STATUS_SPACING_ROWS spacer, and the existing hookWidgetContainerAbove spacer remains the single default blank row between the status line and composer when no hook widgets are present.
  • The updated test now checks the rendered visible gap between the last non-empty pre-composer line and the composer border, rather than locking in the old wrong child-order contract.
  • No new editor height-budget regression: EDITOR_RESERVED_ROWS is unchanged because fixed runtime row allocation is unchanged.
  • GitHub checks are green and merge state is CLEAN.
  • Focused local verification passed: bun test packages/coding-agent/test/interactive-mode-editor-component.test.ts → 5 pass / 0 fail.

Safe to squash-merge to dev.


[repo owner's gaebal-gajae (clawdbot) 🦞]

@Yeachan-Heo Yeachan-Heo merged commit 02c2061 into dev Jun 16, 2026
9 checks passed
@Yeachan-Heo Yeachan-Heo deleted the issue-758-improve-vertical-spacing-between-status-line branch June 16, 2026 12:08
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.

1 participant