Skip to content

Refine modal footers, filepath display and explorer filtering - #344

Draft
flyingrobots wants to merge 18 commits into
mainfrom
feature/footer-layout-settings
Draft

flyingrobots wants to merge 18 commits into
mainfrom
feature/footer-layout-settings

Conversation

@flyingrobots

@flyingrobots flyingrobots commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Goal

Let users choose footer density and filepath display, with a clear mode badge and a modal explorer filter prompt. Apply the user's Settings border and selection feedback.

Plan

  • Provide Focused, Per-pane and Compact layouts with remembered preferences.
  • Add bold filled mode badges, muted ordinary text and normal foreground emphasis.
  • Add remembered Git-root-relative / fully qualified filepath display.
  • Fix opaque Settings borders and filled theme selections without cursor inversion.
  • Move explorer filtering to a temporary footer prompt and retain an active-query header.
  • Finish the new witness gallery, retrospective and final-head CI.

Current status

Full local check passed 892 tests: 880 passed, 12 existing skips, no failures or quality regressions. Forty-nine focused UI/preference tests pass. Native production Echo checks at 100×32 and 60×16 verified filtering, header/caret/list clicks, saving/restart, light/dark Settings and temporarily showing a hidden footer for input. Implementation CI run 38764169878 passed all 12 jobs. The final witness and exact-head check are in progress.

Stacks on #342, which depends on #339. No merge is performed here.

Closes #343.

@flyingrobots flyingrobots added the work-in-progress Cycle or PR is intentionally in progress and not ready to merge label Oct 15, 2026
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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

Comment @coderabbitai help to get the list of available commands.

@flyingrobots flyingrobots removed the work-in-progress Cycle or PR is intentionally in progress and not ready to merge label Oct 15, 2026
@flyingrobots
flyingrobots marked this pull request as ready for review October 15, 2026 07:10
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T07:19:23.957256Z b74c373 Draft marked ready
ℹ️ 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.

@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: b74c3739fe

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

Comment on lines +1 to +3
import type { FooterPresentation, FooterSurfaceObservation } from '../../ui/footer-layout-view.js';
import { resolveWorkspaceLayout } from '../../ui/drawer-layout.js';
import { resolveSettingsDrawerWidth } from '../../ui/settings-drawer.js';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep footer presentation dependencies pointing inward

Move the observation DTO and layout-independent derivation into the application layer, and let the UI consume them. This new application module imports its contract and geometry helpers from src/ui, reversing the canonical dependency direction (UI -> app, not app -> UI) and coupling application state derivation to terminal presentation details such as settings-drawer width.

AGENTS.md reference: AGENTS.md:L18-L18

Useful? React with 👍 / 👎.

Comment thread src/adapters/footer-preference-json.ts Outdated
@@ -0,0 +1,84 @@
import { FOOTER_LAYOUT, type FooterLayout } from '../ui/footer-layout.js';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Import preference values from the port layer

Import FOOTER_LAYOUT and FooterLayout directly from src/ports/footer-preferences.ts here and in footer-preferences.ts. These persistence adapters currently depend on a UI barrel for their runtime contract, violating the adapter-to-port boundary and making headless preference loading transitively load presentation code.

AGENTS.md reference: AGENTS.md:L18-L18

Useful? React with 👍 / 👎.

Comment on lines +152 to +156
if (state.footerPresentation != null) return renderFooterLayout({
presentation: state.footerPresentation, width, background,
command: state.commandLine?.active ? {
i18n: state.i18n, commandLine: state.commandLine, contextLine: commandLineHints(state.i18n), commandLineError: state.commandLineError,
} : undefined,

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 Preserve RTL layout in the new footer path

When an Arabic, Hebrew, or other RTL locale uses the production footer, this branch routes every new layout through renderFooterLayout without passing state.i18n.direction. Consequently its inactive-command path always paints focused text from the left and global text from the right, bypassing the existing RTL alignment behavior; only the nested command renderer still receives direction. Thread direction into the new renderer and place logical sides accordingly.

Useful? React with 👍 / 👎.

Comment on lines +20 to +21
const layout = nextFooterLayout(model.footerLayout, delta);
if (context.footerPreferences?.save(layout).ok !== false) return [{ ...model, footerLayout: layout }, []];

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 Reconcile the editor after changing footer height

When switching from Compact to Focused or Per-pane, the body viewport shrinks by one row but this update leaves editor.scrollRow unchanged. If the cursor occupied Compact's extra bottom row, it falls outside the new source viewport and disappears until another editor action calls ensureEditorVisible; growing the viewport can likewise expose a row without refreshing viewport-bounded projections. Reconcile the editor against editorViewport when the selected layout changes its row count.

Useful? React with 👍 / 👎.

Comment on lines +40 to +41
} finally {
if (existsSync(temporary)) unlinkSync(temporary);

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 Serialize preference replacement across concurrent writers

When another process edits ~/.jimrc concurrently, both writers can read the same source and pass this comparison before either performs its rename; the last rename then replaces the entire document and loses the other writer's unrelated settings. The read-before-rename check is therefore a TOCTOU guard rather than a compare-and-swap. Serialize writers with an atomic lock or equivalent protocol before replacing the document.

Useful? React with 👍 / 👎.

Comment thread src/adapters/footer-preferences.ts Outdated
Comment on lines +30 to +31
function saveDocument(path: string, layout: FooterLayout): void {
const target = existsSync(path) ? realpathSync(path) : path;

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 Preserve dangling preference symlinks

When ~/.jimrc is a dangling symlink, existsSync(path) returns false, so this branch treats the link as a missing file and later renames the temporary file over the symlink itself. That destroys the configured indirection instead of retaining the symlink identity or reporting that its target is unavailable. Detect the directory entry with lstat/readlink and fail safely or resolve the intended target without replacing the link.

Useful? React with 👍 / 👎.

Comment thread src/ui/footer-layout-view.ts Outdated
Comment on lines +124 to +126
const characters = Array.from(identity);
while (characters.length > 0 && visibleLineLength(characters.join('')) > width - 1) characters.shift();
return `…${characters.join('')}`;

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 Clip footer identities at grapheme boundaries

When a long file path contains a decomposed character or a multi-code-point emoji, Array.from splits it into individual code points and the loop can remove only part of the grapheme. A narrow footer can therefore render an orphan combining mark, variation selector, or ZWJ sequence instead of a valid filename tail. Segment by grapheme cluster, then apply display-cell clipping to those clusters.

Useful? React with 👍 / 👎.

@flyingrobots
flyingrobots marked this pull request as draft October 15, 2026 10:22
@flyingrobots flyingrobots added the work-in-progress Cycle or PR is intentionally in progress and not ready to merge label Oct 15, 2026
@flyingrobots flyingrobots changed the title Choose focused, per-pane, or compact footer layouts in Settings Refine modal footers, filepath display and explorer filtering Oct 15, 2026
@flyingrobots
flyingrobots changed the base branch from feature/explorer-search-input to main October 20, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

work-in-progress Cycle or PR is intentionally in progress and not ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Choose focused, per-pane, or compact footer layouts in Settings

1 participant