Skip to content

feat(ui): harness icon in the terminal header (visible on mobile), truncate long session names - #100

Merged
fkesheh merged 1 commit into
mainfrom
feat/mobile-harness-icon
Sep 6, 2026
Merged

fkesheh merged 1 commit into
mainfrom
feat/mobile-harness-icon

Conversation

@fkesheh

@fkesheh fkesheh commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

What

On mobile the sidebar is hidden behind the Terminal tab, so the terminal header is the only thing identifying the current session — but it showed a generic ›_ glyph with no sign of which agent the session runs.

  • Render the session's HarnessIcon in the terminal header (Terminal.tsx), falling back to ›_ only when the shell type is unknown. Mirrors the desktop sidebar rows (SessionList.tsx). Shows on all breakpoints; purely additive.
  • Also fix a mobile layout bug found while verifying: the header's flex row lacked min-w-0, so a long session name (a full agent command) never truncated and instead widened the page past the viewport, clipping the header and the on-screen key toolbar. Added min-w-0 overflow-hidden; the icon keeps shrink-0, so only the name ellipsizes.

Verification

Isolated Docker container serving this branch's panel, real Chromium at 390×844 (isMobile), codex session with a long name:

  • harness icon renders immediately before the name ([data-harness-icon="codex"]);
  • the name ellipsizes (span scrollWidth 957 vs clientWidth 281);
  • document.documentElement.scrollWidth and window.innerWidth both stay 390 — no horizontal overflow.

tsc clean; existing HarnessIcon tests pass. Screenshot in the review notes.

Single file: ui/src/components/Terminal.tsx.

🤖 Generated with Claude Code

…long session names

On mobile the sidebar is hidden behind the Terminal tab, so the terminal
header is the only place identifying the current session — but it showed
a generic ›_ glyph with no indication of which agent the session runs.
Render the session's HarnessIcon there (falling back to ›_ only when the
shell type is unknown), mirroring the desktop sidebar rows. Shows on all
breakpoints; the icon is purely additive.

While verifying at a 390px viewport, the header's flex row lacked
min-w-0, so a long session name (a full agent command) never engaged its
ellipsis and instead widened the page past the viewport, clipping the
header and the mobile key toolbar. Add min-w-0 + overflow-hidden so the
name truncates and the page stays within width; the icon keeps shrink-0.

Verified in an isolated Docker container at 390x844: the harness icon
renders before the name, the long name ellipsizes, and scrollWidth /
innerWidth stay at 390 with no horizontal overflow.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ftown Ready Ready Preview Sep 6, 2026 1:20am UTC

Request Review

@fkesheh
fkesheh merged commit 9629eae into main Sep 6, 2026
5 checks passed
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