Repository navigation
feat(workspace): Trinity's logo and "Trinity Workspace" in the top left (ent#556) - #2653
Conversation
…ft (ent#556) The Workspace's brand corner was a hand-drawn outline `<svg>` and the bare word "Workspace", in two places that had to agree and had no shared source: the signed-in shell (`PortalSidebar.vue`) and the sign-in screen (`views/Portal.vue`). The real marks already shipped and were already used by `NavBar` and `PublicChat`; the Workspace never adopted them. Both surfaces now render ONE component, `PortalBrand.vue`. "Both surfaces carry the same mark and wording" is an acceptance criterion, and two copies of the markup is exactly how that stops being true. The name is a value in `portalBrand.js`, not a literal in two templates — and it is deliberately the PRODUCT name, not an instance name. The platform does resolve a per-instance label (`services/instance_identity.py`), and a company running Trinity could plausibly want its own name in that corner; but this surface's audience is the operator's own organisation (ent#78, ruled 2026-09-06) and naming the product is the point of the ask. One constant with one reader is what keeps the white-labelling call cheap later. Details that are load-bearing rather than tidiness: * **The light/dark swap follows `NavBar`** rather than inventing a second pattern — a dark mark on a dark ground is the one failure this must not have. Verified in a real browser at both themes. * **Not a dead affordance, and not a platform route.** The shell links to the Workspace root; the sign-in screen renders the mark INERT, because a client session holds no `users` row and the reader is already at the root. `:is` picks `router-link` or `div`. * **The accessible name is on the wrapper, the images are decorative.** A screen reader says the product once — and still says it when the wordmark truncates away at a narrow sidebar. (This is why the images carry `alt=""` rather than `alt="Trinity"`: with the name beside them, alt text would double-read.) * **`truncate min-w-0` on the wordmark, `shrink-0` on the mark.** The sidebar resizes to `SIDEBAR_MIN` (200px, ent#492) and this row also carries the ask and unread badges; without them the name pushes the badges out of the band. * **The mark keeps the 24px box the icon it replaces used**, so the `h-14` band ent#547 is shortening does not grow. Measured at 56px. Tab titles: the platform renders `Trinity — <label>` (#1418), so a Workspace tab already reads "Trinity — Workspace". That single format is kept rather than given a second one for one surface. What is added is identifiability where the ROUTE knows its subject: `/workspace/a/:agentName` now titles `Workspace · <agent>` through the existing `agentTabTitle`, so an operator sees the display name and a client falls back to the slug. Threads and rooms cannot do this — their subject is component state, not a route param. The generic icon stays where it is still a legitimate EMPTY-STATE illustration (the `Portal.vue` stage zones). It was a brand mark only in the two blocks this replaces. Verified: 2534 frontend unit tests (18 new source-guard cases, mutation-checked — a dark-on-dark swap and a platform-route link each turn the suite red), plus a real-browser pass over both surfaces at 1280 and 1920, light and dark, asserting exactly one mark visible and the right one per theme. Related to Abilityai/trinity-enterprise#556 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Bd71qsYbFodvofba8P69eP
… owned it `portalBrand.js` declared `WORKSPACE_ROOT = '/workspace'` while `portalUtils.js` — same directory — already exported the identical constant, consumed by `stores/clientPortal.js:546` for the sign-out target and pinned by `portalAgentPageUx.spec.js` and `workspaceSession.spec.js`. `PortalSidebar.vue` imported the new one on the line directly above its existing destructure from the module that already had it. That is the defect this PR was written to remove — its own header calls the old state "two places that had to agree and had no shared source" — fixed for the name and recreated for the route. The two specs pinned the two copies independently, so a later divergence (the sidebar mark linking one way, sign-out redirecting the other) would have shipped green. It was also a latent `SyntaxError`: adding `WORKSPACE_ROOT` to the adjacent `./portalUtils` destructure would have created a duplicate binding. The reasoning that justified the constant moves with it rather than being dropped — the brand mark is now documented at the definition as a second consumer, since that is where the next reader will look. merge-train: mechanical, per the merge-train note on the PR. Verified: npm run test:unit → 113 files / 2534 tests passed; vite build OK. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Lts14MGxLdPU5tvxL6CfAo
|
merge-train 2026-09-09: on this train — and I pushed one mechanical fix to your branch ( What I changed and why. That is the defect this PR exists to remove, applied to the name and recreated for the route — your own file header calls the old state "two places that had to agree and had no shared source." Because the two specs pinned the two copies independently, a later divergence (the sidebar mark linking one way while sign-out redirects the other) would have shipped green. It was also a latent Four files, no behaviour change: dropped the duplicate export, added Verification note, because your spec is candid about this and I want to be too. 21 of the 23 assertions are Both branches render correctly, no leaked Also verified: Two follow-ups, not blockers:
I also patched the body's Scope check on the router change, since it is adjacent to the branding ask rather than part of it: verified safe. The function form of |
#2647 (the parent this branch was stacked on) squash-merged to dev an hour ago, so its content arrived here from two directions at once: as the branch's own commits and as dev's squashed form. All five conflicts are that, and the resolution is the same in each — keep the branch, which already carries #2647's work plus #2676's changes on top. Portal.vue, three hunks: #2676 RETIRES `voiceCanvasLeaving` (a rail entering from zero width is complementary to a canvas leaving toward zero grow, so the row's total is conserved and the flag has nothing left to sequence). dev still has the flag, its two transition handlers and the old `v-if` on `PortalRail`. The branch's side is the intended end state. The three spec files are the same shape one level along: each conflict is #2676's updated assertion against the pre-#2676 one dev still holds (`v-if="railHasColumn"` on the wrapper vs `v-if="railVisible && …"` on `PortalRail`). Resolved HUNK-WISE, not file-wise. `git checkout --ours` was the first attempt and was WRONG: it takes the whole file from HEAD and so would have discarded dev's ent#556 `PortalBrand` block from the signed-out shell — #2653's work, untouched by this branch and present only in dev. Caught by diffing the resolution against dev before committing. The merged file now carries both. Frontend suite green on the result: 118 files / 2613 tests. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01RSjVEjay9ztC1oDXXkh9uN
The Workspace's brand corner was a hand-drawn outline
<svg>and the bare word "Workspace", in two places that had to agree and had no shared source: the signed-in shell (PortalSidebar.vue) and the sign-in screen (views/Portal.vue). The real marks already shipped and were already used byNavBarandPublicChat— the Workspace simply never adopted them.Both surfaces now render one component,
PortalBrand.vue. "Both surfaces carry the same mark and wording" is an AC, and two copies of the markup is exactly how that stops being true.The naming decision, stated
The name is a value in
portalBrand.js, and it is deliberately the product name. The platform does resolve a per-instance label (services/instance_identity.py,TRINITY_INSTANCE_NAME), and a company running Trinity could plausibly want its own name in that corner — but this surface's audience is the operator's own organisation (ent#78, ruled 2026-09-06) and naming the product is the point of the ask. Instance naming and white-labelling stay a separate, later call; one constant with one reader is what keeps that call cheap.Load-bearing, not tidiness
NavBarrather than inventing a second pattern — a dark mark on a dark ground is the one failure this must not have.usersrow and the reader is already at the root.:ispicksrouter-linkordiv.alt=""rather thanalt="Trinity": with the name beside them, alt text would double-read. The AC asked alt to name the product; putting the name on the wrapper delivers that in both the wide and truncated states, which alt alone cannot.truncate min-w-0+shrink-0. The sidebar resizes toSIDEBAR_MIN(200px, ent#492) and this row also carries the ask and unread badges; without them the name pushes the badges out of the band.h-14band ent#547 is shortening does not grow. Measured at 56px in the browser.Tab titles — what I did and did not change
The platform renders
Trinity — <label>(#1418), so a Workspace tab already reads "Trinity — Workspace". I kept that single format rather than giving one surface a second one; a bespoke absolute title here would break the convention and its e2e for a difference of one em dash. Flagging it rather than deciding silently — if you want the tab to read literallyTrinity Workspace, that is a one-line change to the title guard and I'll make it.What is added is identifiability where the route knows its subject:
/workspace/a/:agentNamenow titlesWorkspace · <agent>through the existingagentTabTitle, so an operator sees the display name and a client falls back to the slug. Threads and rooms cannot do this — their subject is component state, not a route param.The generic icon stays where it is still a legitimate empty-state illustration (the
Portal.vuestage zones). It was a brand mark only in the two blocks this replaces, and the guard is scoped accordingly.Acceptance criteria
NavBarpatternVerification
The browser pass asserts exactly one mark visible per theme and that it is the right one, the 56px band height, the badges staying inside a 200px sidebar, and the agent tab title. Mutation-checked: a dark-on-dark swap and a platform-route link on the signed-out mark each turn the suite red.
Run locally against a
vite previewbuild with the API mocked (no backend container up on this box); the rig was discarded. Screenshots of the brand corner in both themes are in the session.Fixes abilityai/trinity-enterprise#556
🤖 Generated with Claude Code
https://claude.ai/code/session_01Bd71qsYbFodvofba8P69eP