Skip to content

refactor(desktop): replace terminal pane path nav with name and status#1328

Merged
Kitenite merged 5 commits into
mainfrom
kitenite/remove-terminal-nav-pane-thing
Feb 9, 2026
Merged

refactor(desktop): replace terminal pane path nav with name and status#1328
Kitenite merged 5 commits into
mainfrom
kitenite/remove-terminal-nav-pane-thing

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Feb 9, 2026

Summary

  • Remove the DirectoryNavigator component from the terminal pane toolbar, which provided an interactive folder-browsing popover
  • Show the pane name and status indicator in the toolbar instead, matching the tab strip pattern

Changes

  • TabPane.tsx: Replace DirectoryNavigator with pane name text + StatusIndicator component
  • DirectoryNavigator/: Delete entire component directory (no longer used)
  • terminal.ts tRPC router: Remove listDirectory procedure and unused node:fs/promises / node:path imports
  • useTerminalCwd.ts: Update comments referencing DirectoryNavigator

Test Plan

  • Open terminal panes — toolbar shows pane name (e.g. "Terminal") instead of folder path
  • Verify status indicator (amber/red/green dot) appears in toolbar when agent is active
  • Confirm split pane and close pane buttons still work
  • Verify no regressions in terminal functionality (cwd tracking still works)

Summary by CodeRabbit

  • Refactor
    • Terminal tabs no longer include the in-tab directory navigator or directory-browsing UI; tabs now show terminal name and a status indicator only.
    • Directory listing/navigation support removed from the app.
    • Pane naming is now immediate via a pane-level name setter; tab names are derived from their panes (single pane shows pane name; multi-pane tabs show "Multiple panes (N)").
    • Debounced auto-title behavior replaced with direct pane-name updates.

…s indicator

Remove the DirectoryNavigator component from the terminal pane toolbar
and show the pane name with a status indicator instead, matching the
tab strip pattern.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 9, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Removed directory-navigation backend and frontend pieces, replaced debounced tab auto-title plumbing with a pane-scoped naming API, and updated terminal UI to show a name + status indicator instead of the DirectoryNavigator.

Changes

Cohort / File(s) Summary
Backend terminal router
apps/desktop/src/lib/trpc/routers/terminal/terminal.ts
Deleted the listDirectory TRPC procedure and its input/FS/read logic, sorting, parent-path computation, and error handling.
Frontend directory navigation component
apps/desktop/src/renderer/screens/main/components/.../DirectoryNavigator/DirectoryNavigator.tsx, apps/desktop/src/renderer/screens/main/components/.../DirectoryNavigator/index.ts
Removed the entire DirectoryNavigator component and its re-export — removes breadcrumb UI, directory listing, and TRPC/electron navigation integrations.
Tab/Pane UI and status
apps/desktop/src/renderer/screens/main/components/.../TabView/TabPane.tsx, apps/desktop/src/renderer/screens/main/components/.../Terminal/Terminal.tsx
Replaced DirectoryNavigator with a terminal name display + conditional StatusIndicator. Switched Terminal plumbing to use pane-scoped setPaneName instead of the old tab auto-title API.
Terminal hooks & refs
apps/desktop/src/renderer/screens/main/components/.../Terminal/hooks/useTerminalLifecycle.ts, .../useTerminalRefs.ts, .../useTerminalCwd.ts
Removed debounced title-setter type and debounce wrapper; introduced setPaneNameRef and updated hook interfaces/usages. Only comment edits in useTerminalCwd.
Tabs store & types
apps/desktop/src/renderer/stores/tabs/store.ts, apps/desktop/src/renderer/stores/tabs/types.ts
Added setPaneName(paneId, name) and deriveTabName to compute tab titles from pane names/counts; wired re-derivation across pane/tab mutations and moves.

Sequence Diagram(s)

sequenceDiagram
  participant Terminal as Terminal Component
  participant Hooks as useTerminalLifecycle / useTerminalRefs
  participant Store as Tabs Store
  participant UI as Tab/Pane UI

  Terminal->>Hooks: emit title update (paneId, title)
  Hooks->>Store: call setPaneName(paneId, title)
  Store->>Store: deriveTabName(panes, tabId)
  Store->>UI: update tab title/state
  UI-->>Terminal: render updated name/status
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hopped through breadcrumbs, nosed each little trail,
Now I tuck them in the burrow and follow a new tale.
A gentle status beacon, a name that softly sings,
Pane by pane we hum along — no more directory wings. 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly summarizes the main change: removing DirectoryNavigator and replacing it with pane name and status indicator in the terminal toolbar.
Description check ✅ Passed The description includes all required template sections: Summary of changes, detailed Changes breakdown, and a Test Plan covering the key scenarios for this refactor.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kitenite/remove-terminal-nav-pane-thing

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 and usage tips.

@Kitenite Kitenite merged commit e6d0889 into main Feb 9, 2026
5 of 6 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 9, 2026

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

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