Skip to content

feat(workspace): Trinity's logo and "Trinity Workspace" in the top left (ent#556) - #2653

Merged
vybe merged 2 commits into
devfrom
feat/ent556-workspace-branding
Sep 9, 2026
Merged

vybe merged 2 commits into
devfrom
feat/ent556-workspace-branding

Conversation

@dolho

@dolho dolho commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

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 simply never adopted them.

before after
shell + sign-in outline chat-bubble icon · "Workspace" Trinity mark · Trinity Workspace

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

  • 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.
  • Neither dead nor mislinked. 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 at a narrow sidebar. This is why alt="" rather than alt="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 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 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 literally Trinity 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/: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, and the guard is scoped accordingly.

Acceptance criteria

  • logo + "Trinity Workspace", existing assets, platform-navigation weight
  • dark mode correct — white on dark, standard on light, NavBar pattern
  • both surfaces agree; no generic icon or bare "Workspace" left in either brand block
  • not a dead affordance — linked to the Workspace root in the shell, inert and labelled on sign-in, never a platform route
  • tab title names the product (see the note above) and now names the agent on the agent route; the agent-scoped platform titles it must not break are pinned
  • name given to assistive tech; collapses at narrow rail widths; header band unchanged
  • layout holds at 1280 and 1920, light and dark, signed in and signed out

Verification

2534 passed (113 files)   npm run test:unit — 18 new source-guard cases
10 passed                 real Chromium: both surfaces × {1280,1920} × {light,dark}

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 preview build 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

…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
@dolho dolho added the ui PR touches the frontend UI — triggers Playwright e2e tests label Sep 9, 2026
@dolho
dolho requested a review from vybe September 9, 2026 13:22
… 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
@vybe

vybe commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

merge-train 2026-09-09: on this train — and I pushed one mechanical fix to your branch (92b07810). Flagging it explicitly so it isn't a mystery commit.

What I changed and why. portalBrand.js:31 declared export const WORKSPACE_ROOT = '/workspace', but portalUtils.js:633 — same directory — already exported the identical constant. The existing one is consumed by stores/clientPortal.js:12,546 as the sign-out redirect target and pinned by two specs (portalAgentPageUx.spec.js:110, workspaceSession.spec.js:222,234). And PortalSidebar.vue:323 added import { WORKSPACE_ROOT } from './portalBrand' on the line directly above its existing 14-name destructure from ./portalUtils, the module that already had it.

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 SyntaxError: anyone adding WORKSPACE_ROOT to the adjacent ./portalUtils destructure would have created a duplicate binding.

Four files, no behaviour change: dropped the duplicate export, added WORKSPACE_ROOT to PortalSidebar.vue's existing ./portalUtils destructure, repointed the spec import. Your WORKSPACE_ROOT docstring was too good to delete, so it moved to the definition in portalUtils.js — the brand mark is now documented there as a second consumer, since that is where the next reader will look. npm run test:unit → 113 files / 2534 passed; vite build clean.

Verification note, because your spec is candid about this and I want to be too. 21 of the 23 assertions are readFileSync + toContain over raw source; only the two constant checks execute anything. The header explains why (vitest runs environment: 'node' with no mount harness), and that is a real constraint. But it means a typo in the <img> binding, a broken asset path, or a router-link that fails to resolve would keep all 23 green. So rather than take it on trust I built the SFC through vite --ssr and rendered both branches:

LINKED  <a href="/workspace" class="flex items-center gap-2 min-w-0 hover:opacity-80 transition-opacity"
           aria-label="Trinity Workspace">
          <img src="data:image/svg+xml,…[BLACK]" alt aria-hidden="true" class="h-6 w-6 shrink-0 dark:hidden">
          <img src="data:image/svg+xml,…[WHITE]" alt aria-hidden="true" class="h-6 w-6 shrink-0 hidden dark:block">
          <span class="font-semibold truncate min-w-0">Trinity Workspace</span></a>

INERT   <div class="flex items-center gap-2 min-w-0" aria-label="Trinity Workspace">…</div>

Both branches render correctly, no leaked to attribute on the div, and the marks are a genuine pair (trinity-logo.svg is fill="#000000", -white.svg is fill="#ffffff", byte-identical otherwise) — not a single-tone image that vanishes on one ground. Both data URIs ship in the built CSS/JS, and every class passed through a prop survives purge. The code is right; the tests just don't say so.

Also verified: scan-raw-colors.mjs reports PortalBrand.vue carrying zero color classes of any kind, so "new code starts at zero" is satisfied and raw-color-baseline.json is correctly untouched (the removed markup used text-action-primary-600, a semantic token). npm run check:tokens OK. Layout stability holds at SIDEBAR_MIN — badges are ml-auto shrink-0, the wordmark truncate min-w-0.

Two follow-ups, not blockers:

  1. The aria-label is inert on the sign-in instance. The SSR output above shows it landing on a bare <div>; ARIA prohibits naming on role=generic, so AT ignores it and axe-core's aria-prohibited-attr flags the shape. No user-visible loss — the visible wordmark carries the name — but workspaceBranding.spec.js:104 and its comment claim it "carries an accessible name whether or not the wordmark is visible", which is false for that branch. role="img" on the div branch, or binding the label only when to is set, fixes it. (The truncation rationale is moot either way: CSS truncate never removes text from the accessibility tree.)
  2. The light/dark image pair is now triplicated — NavBar.vue:16-17, PublicChat.vue:9-10, PortalBrand.vue:25-33 each hand-roll dark:hidden / hidden dark:block, and the spec now pins NavBar's copy too. A shared BrandMark is what the contract's "primitives over hand-rolled lookalikes" points at. Outside this PR's scope.

I also patched the body's Related to → Fixes abilityai/trinity-enterprise#556. That is safe here (no enterprise-side half to land first), but note the cross-tracker form can't be matched by issue-status-on-merge.yml, so I'll set status-in-dev on ent#556 by hand after the merge.

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 meta.title is already supported (router/index.js:415-416), agentTabTitle is try/catch-wrapped, and a client-portal session with a cold agents store degrades to Trinity — Workspace · <slug> rather than throwing. No route guard, requiresAuth, requiresEntitlement or hideHelpWidget behaviour changed.

@vybe vybe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

merge-train: batch validated green on train/20260909-1840 (#2664). Includes the mechanical WORKSPACE_ROOT dedup pushed to this branch as 92b0781 (see the merge-train note above).

@vybe
vybe merged commit 1a5e3bc into dev Sep 9, 2026
27 checks passed
dolho added a commit that referenced this pull request Sep 10, 2026
#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui PR touches the frontend UI — triggers Playwright e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants