fix(aterm): order the window title so truncation eats the tail (#1252) #1268

Merged
coilyco-ops merged 1 commit from aos/claude/mu55-title-order into main 2026-08-26 06:32:51 +00:00
Member

Closes #1252. Tier 1 of the #1245 dispatch.

Evidence, re-derived from the live roster

The samples in the issue body are stale (Developer Platform Engineer, Olaf, Lucia). These come from --dry-run against agent-compose v2.54.0, first 30 runes, which is roughly where Cmd-Tab and a window list cut.

Two checkouts, one role, which is the case the issue names:

before  '⟐ ◆ Angie [she] (Agentic Platf'   both windows, byte-identical
after   'agentic-os@aos/claude/mu55-tit'
        'agentic-os-kai@aos/claude/mu55'

Full titles after:

agentic-os@aos/claude/mu55-title-order // Agentic Platform Engineer // ⟐ ◆ Angie [she] // acting
agentic-os-kai@aos/claude/mu55 // Agentic Platform Engineer // ⟐ ◆ Angie [she] // acting

What changed

Segments run workspace, task title, role, glyphs and seat name, expression. maxTitleRunes truncation now eats the expression rather than the payload. seatAnnotation keeps the role suffix for the announce line and the plan identity; the title uses a new seatName so the role is not printed twice.

The workspace is repo@branch from git -C <cwd> rev-parse --show-toplevel and symbolic-ref, a detached head degrades to the repository alone, and a plain directory falls back to its basename. launchPlan carries it as workspace.

One judgment call worth reviewing

When --working-directory is not set, the directory is the projects root, the same for every window. Printing it would put a constant back in exactly the slot this reorders around, so the segment is omitted and the role leads:

'Agentic Platform Engineer // ⟐'
'Systems Administrator // ⬟ ◆ V'

The trade this makes

Same checkout, two roles, truncated to 30, now collide:

before  '⟐ ◆ Angie [she] (Agentic Platf' / '⬟ ◆ Vera [she] (Systems Admini'
after   'agentic-os@aos/claude/mu55-tit' / 'agentic-os@aos/claude/mu55-tit'

30 characters hold repo and branch or the role, not both, and #1252 chose the workspace. Recording it rather than hiding it: the case only arises when a caller points two different roles at the same checkout, and the full title still carries the role.

Verification

  • just aterm-fmt, just aterm-lint, just aterm-test clean
  • pre-commit run clean on every touched file
  • new title_test.go: segment order, the two-checkout separation above, the role-leads fallback, task-title placement, and workspaceLabel across branch, detached, plain directory, and no-git
Closes #1252. Tier 1 of the #1245 dispatch. ## Evidence, re-derived from the live roster The samples in the issue body are stale (`Developer Platform Engineer`, `Olaf`, `Lucia`). These come from `--dry-run` against `agent-compose v2.54.0`, first 30 runes, which is roughly where Cmd-Tab and a window list cut. Two checkouts, one role, which is the case the issue names: ``` before '⟐ ◆ Angie [she] (Agentic Platf' both windows, byte-identical after 'agentic-os@aos/claude/mu55-tit' 'agentic-os-kai@aos/claude/mu55' ``` Full titles after: ``` agentic-os@aos/claude/mu55-title-order // Agentic Platform Engineer // ⟐ ◆ Angie [she] // acting agentic-os-kai@aos/claude/mu55 // Agentic Platform Engineer // ⟐ ◆ Angie [she] // acting ``` ## What changed Segments run workspace, task title, role, glyphs and seat name, expression. `maxTitleRunes` truncation now eats the expression rather than the payload. `seatAnnotation` keeps the role suffix for the announce line and the plan identity; the title uses a new `seatName` so the role is not printed twice. The workspace is `repo@branch` from `git -C <cwd> rev-parse --show-toplevel` and `symbolic-ref`, a detached head degrades to the repository alone, and a plain directory falls back to its basename. `launchPlan` carries it as `workspace`. ## One judgment call worth reviewing When `--working-directory` is not set, the directory is the projects root, the same for every window. Printing it would put a constant back in exactly the slot this reorders around, so the segment is omitted and the role leads: ``` 'Agentic Platform Engineer // ⟐' 'Systems Administrator // ⬟ ◆ V' ``` ## The trade this makes Same checkout, two roles, truncated to 30, now collide: ``` before '⟐ ◆ Angie [she] (Agentic Platf' / '⬟ ◆ Vera [she] (Systems Admini' after 'agentic-os@aos/claude/mu55-tit' / 'agentic-os@aos/claude/mu55-tit' ``` 30 characters hold repo and branch or the role, not both, and #1252 chose the workspace. Recording it rather than hiding it: the case only arises when a caller points two different roles at the same checkout, and the full title still carries the role. ## Verification * `just aterm-fmt`, `just aterm-lint`, `just aterm-test` clean * `pre-commit run` clean on every touched file * new `title_test.go`: segment order, the two-checkout separation above, the role-leads fallback, task-title placement, and `workspaceLabel` across branch, detached, plain directory, and no-git
fix(aterm): order the window title so truncation eats the tail (#1252)
All checks were successful
ci / aos-eval-tests (pull_request) Successful in 7s
ci / ward-doctor (pull_request) Successful in 8s
ci / aos-cli-tests (pull_request) Successful in 27s
ci / gate (pull_request) Successful in 52s
c0f9207ba6
A window manager truncates near 30 characters, and every title opened with a
glyph pair, a seat name, and a long role display name. Two `aterm platform`
windows in different checkouts produced byte-identical titles, and the working
directory never appeared at all.

Segments now run workspace, task title, role, glyphs and seat name, expression.
The workspace is the checkout `--working-directory` points at, rendered
`repo@branch` from git. It is left out rather than printed as a constant when
the directory is the default projects root, since a constant in the front slot
is the defect this reorders around, and the role leads instead.

Measured on the live roster, first 30 runes, two checkouts one role:

  before  '⟐ ◆ Angie [she] (Agentic Platf'   both windows
  after   'agentic-os@aos/claude/mu55-tit'
          'agentic-os-kai@aos/claude/mu55'

Same checkout and two roles is the trade: 30 characters hold repo and branch or
the role, not both, and #1252 chose the workspace. On the default projects root,
which is where a bare `aterm platform` lands, the role leads and still separates.

Closes #1252

Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Agent-Role: platform
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-flight-deck/agentic-os!1268
No description provided.