refactor(desktop): migrate workspace identity form onto the design system

Merged
CH
5d ago
+80-56

D17 of the design-system migration (Desktop stack, base feature/desktop-d16-api-key-settings, #3392).

What

  • Settings › Workspace's identity row is drawn by @luke/ui's SettingsSection and SettingsRow, through MenuRow's row form (added in D16). It replaces the untitled desktop SettingsGroup and the hand-built .settings-copy markup. The workspace's tile goes in the row's leading slot, its name is the label, and "N members · You're the owner" is the description.
  • Rename is the barrel Button (outline), replacing toolbar-button bordered-button. It is still disabled while a rename is out, and focus still returns to it when a rename ended by key settles.
  • The rename field is still the desktop's TaskNameField (shared with the sidebar and tabs, which are out of scope), placed in the row's label. Return, blur, Escape, trimming and the bound are unchanged.
  • The photo's ⋯ acts (Upload / Replace / Remove), the hidden picker, Remove's confirm dialog, the Remove lock during an upload, and the refusal under the row (role="alert", cleared on the next try) are all unchanged.
  • No @luke/ui/compat callers lived on this surface. The rest of the page (members, invitations, integrations, repositories, leave) stays on SettingsGroup until D18 and the rows after it.

Selectors

  • New .workspace-identity wrapper (row plus refusal). Its rules join API keys' (.api-key, .workspace-identity and … > .error-message) on the contract's role tokens.
  • .workspace-name-input is now display: block, with a -3px bottom margin instead of -1px, so the 24px field fits the label's 18px line.
  • Nothing became unused: .settings-copy, .settings-row and .settings-input still have other callers on this page and elsewhere.

Visible changes

  • The name uses the label role (13/18, 500) instead of strong (13/1.35, 500). The line under it uses the caption role in the subtle colour (12/16) instead of small (12/1.4, tertiary), as other migrated rows do.
  • Rename has the barrel outline look at the same 30px height and 8px radius.
  • While the name is being edited the row keeps its height. Before, it grew by about 2px.
  • Below a 380px row, Rename and the ⋯ drop below the words to the row's end, as the shared row contract requires.

Tests

  • workspace-page.test.ts: the identity row is found as the page's first MenuRow, its name by the row's label and its line by the description, instead of the retired strong/small. rowNamed no longer has to skip the first group, because the identity row is no longer a .settings-row. Every assertion about behaviour is unchanged.
  • No new tests, since behaviour did not change.
  • pnpm check:affected exits 0.

Evidence

Captured on Linux with headless Chrome at 1280×840: the real WorkspacePage rendered in jsdom by a throwaway, uncommitted copy of the page's test (synthetic workspace "acme", members Dana and Sam), dumped into the built desktop stylesheet inside the SettingsPage frame.

LightDark
Owner, at rest
Renaming in place
Admin's rename refused

Not verified on a Mac

  • SF Pro rendering of the row, the tile and the in-place field
  • A real photo upload and removal against a live workspace, which were exercised only through the tests
  • The in-place field's focus ring and selection on macOS

🤖 Generated with Claude Code