Layout and navigation
The shared shell fills mobile screens. At desktop widths (768px and above), it has a 32px inset, rounded corners, and a backdrop. The desktop sidebar keeps search visible while groups scroll independently of the panel. Selected tabs have a visible active state and an accessible current-page marker. Exactly one entry is current: the active tab name matched exactly within the first group that owns it. Closing, search shortcuts and URL state keep their behavior. On mobile, a section selector opens a navigation drawer. The drawer shows one highlight, which starts on the current section and also carries a check mark. Touch and hover never move that highlight; the keyboard and search do, and clearing the search returns it to the current section. Navigation hover styles apply only to fine pointers that can hover. Selector, drawer entries, search and close controls are at least 44px tall on mobile, and the drawer skips its slide animation under reduced motion. The shell regression suites live inpackages/ui/src/components/ui/custom/__tests__/settings-dialog-shell.test.tsx
and settings-mobile-nav.test.tsx beside it.
Board layout uses always-visible status headings and divided list rows. Each row
shows its drag handle, list color, name and menu; the status heading above it
names the status, so rows do not repeat it. Status headings do not collapse. Empty statuses retain a compact hint and an Add list
action. Drag handles support pointer and keyboard reordering; Edit list provides
a keyboard-accessible status selector, including empty target statuses. Ordering
coverage lives in packages/tasks-ui/src/tu-do/shared/board-layout-ordering.test.ts.
URL contract
Scope: apps/web and every satellite that renders a settings dialog (the shared satellite user menu, plus the dedicated Calendar and Tasks hosts).- A bare
settingsTabis enough to open the dialog. Before 2026-10-23, the dialog opened only whensettingsDialog=openwas also present, so links such as/personal?settingsTab=securitysilently stayed closed. - Tab ids are lowercase
[a-z0-9_-], at most 64 characters. Malformed values are ignored. - An unknown or unavailable tab falls back to the app’s first enabled tab. The URL is not rewritten, so a tab that registers later (for example after a permission check resolves) still opens.
- Host-specific params travel with the dialog and are cleared with it:
settingsBoardId(Tasks/web board settings) andsettingsLinkedProvider(web identity-link callback). - When the signed-in web root (
/or/<locale>) redirects to the default workspace, settings params are carried over. Other root query params are still dropped, as before.
History
- Opening a closed dialog pushes a history entry, so Back closes it and Forward reopens it.
- Switching tabs and closing replace the current entry, so tab browsing does not fill the history stack.
- All updates are shallow (no server round-trip) and keep the scroll position.
- apps/web shows the dialog optimistically on an open intent, before the URL updates. That optimistic state is dropped as soon as the URL acknowledges the open, even if the lazy dialog bundle is still loading. Back always closes the dialog.
Identity-link callback
settingsLinkedProvider is set on the return URL whether the provider flow
succeeded, failed or was cancelled. apps/web shows the “linked” success message
only after a fresh identities read contains that provider. Otherwise it shows a
neutral “couldn’t confirm” message.
Tabs every app has
Scope: every satellite that renders the shared satellite user menu. Default: every such app shows one Account group with the same tab ids as apps/web, so?settingsTab=<tab> means the same thing in every app.
Apps with their own dialog (ai, calendar, cms, contacts, drive, finance, forms,
git, infrastructure, inventory, rewise, tasks, track) add the Account group with
createAccountSettingsNavGroup and render SatelliteAccountSettingsPanel, next
to their app tabs. Apps without one (chat, learn, lettin, mail, meet, mind,
parley, storefront, teach) get SatelliteDefaultSettingsDialog: the Account
group, appearance and the onboarding guide. The satellite user menu has a
Settings item (Cmd/Ctrl+,) that opens the same dialog.
App-specific tabs stay pluggable. An app adds its own nav groups and panels, and
SatelliteAccountSettingsPanel renders nothing for tabs it does not own.
Security-sensitive tabs stay in apps/web
Satellites do not reimplement password change, 2FA, passkeys, identity linking or session revocation, and they do not proxy those mutations. apps/web owns re-authentication, the WebAuthn relying party and session revocation. The satelliteaccounts, security and sessions tabs link to
<web origin>/personal?settingsDialog=open&settingsTab=<tab> in a new tab
(rel="noopener noreferrer"), which opens the web dialog on the same tab.
Satellites edit only display name, full name and avatar upload, through the
existing web profile endpoints (/api/v1/users/me/*) in
@tuturuuu/internal-api, using the satellite session and the /api proxy
contract.
- Email is a link-out. A satellite session’s admin client has no provider
session and cannot change the auth email. Satellites show the email read-only
and link to
?settingsTab=profilein apps/web, which owns verification. They never callPATCH /api/v1/users/me/email. - Avatar removal is off in satellites
(
SATELLITE_AVATAR_REMOVE_ENABLED) until the web avatar route fix is merged. Users remove avatars in apps/web.
Exceptions
- apps/web keeps its own dialog with the full tab set.
- nova keeps its own single-page profile dialog. It does not use the satellite user menu.
- hive, pay, apps, tools, external, playground and shortener have no user settings dialog.
- Personal timezone and notification preferences are only in apps/web.
- Calendar keeps workspace timezone under its own calendar tabs.
Implementation
packages/ui/src/hooks/settings-dialog-url.ts is the single source of truth: the
param names, tab-id sanitizing, parse/serialize, fallback resolution, href
building and history mode. useSettingsDialogUrlState
(packages/ui/src/hooks/use-settings-dialog-url-state.ts) is the only way a host
reads or writes the dialog URL state. Build links with buildSettingsDialogHref
instead of hand-writing query strings.
Regression coverage
packages/ui/src/hooks/settings-dialog-url.test.ts: parse/serialize, the baresettingsTabdeep link, sanitizing, unknown-tab fallback, history mode.packages/ui/src/hooks/use-settings-dialog-url-state.test.tsx: push on open, replace on tab switch, every param cleared on close.packages/ui/src/components/ui/custom/__tests__/settings-dialog-shell.test.tsx: URL-restored tab and unknown-tab fallback without a URL rewrite.packages/satellite/src/components/user-nav-client-deep-link.test.tsx: the shared satellite menu host.apps/calendar/src/components/settings/settings-dialog-host.test.tsxandapps/tasks/src/components/settings/settings-dialog-host.test.tsx: dedicated satellite hosts.apps/web/src/components/settings/settings-dialog-shortcuts.test.tsx: web dashboard and user-menu hosts.apps/web/src/components/settings/settings-dialog-host-lazy.test.tsx: Back while the lazy dialog import is pending keeps the dialog closed, including after a repeated open (Cmd/Ctrl+, twice on a task board).apps/web/src/components/settings/account/use-linked-provider-confirmation.test.tsx: link success only after confirmation.apps/web/src/components/settings/account/linked-identities-card.test.tsx: the real card shows no toast while identities are pending, neutral wording for an unlinked provider, and success only when the provider is present.packages/satellite/src/components/account-settings/account-settings.test.tsx: shared Account group tab ids and the web link-out URL.packages/satellite/src/components/user-nav-client-settings.test.tsx: the default dialog for apps without their own, and the menu Settings item.packages/ui/src/components/ui/custom/satellite-user-menu-items.test.tsx: the Settings menu item.packages/satellite/src/components/profile-settings/profile-sensitive-actions.test.tsx: the email link-out sends no email PATCH, and avatar removal is not offered.apps/calendar/src/components/settings/settings-dialog.test.tsx: an app-specific dialog includes the shared account tabs.apps/web/src/__tests__/proxy.test.ts: settings params survive the root redirect.
Workspace operation permissions
The Web settings API requiresmanage_workspace_settings for writes and accepts
only editable configuration fields. Workspace members may still read operational
settings needed by time tracking. A referral promotion selected from Web or
Inventory must belong to the normalized workspace before settings or user links
change.
E2EE key initialization requires manage_e2ee, matching the other key management
operations. Status reads remain available to workspace members.
Per-user referral discounts require update_users or an invoice permission
(view_invoices, create_invoices, update_invoices). Per-user group membership
reads require view_user_groups or those invoice permissions, preserving invoice
forms and previews. API-key callers retain their existing key-scoped admission.
External-project asset edits validate referenced entries and blocks in the
asset’s workspace before updating.
Global crawler data requires root-workspace ai_lab. Legacy memory backfills
require root manage_workspace_roles and preserve each user’s memory-service
consent settings. Root time-tracking exports require
manage_time_tracking_requests; exchange-rate cron requests always require
service or cron authentication, including development.
These rules cover the active Web and Inventory handlers. Regression tests live
beside the settings, encryption, referral, asset, crawler, backfill, export and
exchange-rate handlers, and in Users Core’s referral-discount route tests.
Layout and contrast
Scope: every settings dialog built onSatelliteSettingsDialogShell, plus the Nova dialog. Applies to light and dark themes on web and satellite apps. Mobile Flutter settings follow mobile settings shell instead.
Settings pages are a single centered column of grouped cards, so a person can scan labels down the left edge and controls down the right.
Rules:
- The shell renders the page title and description, so a panel does not repeat them.
- Panel roots use
space-y-8. Cards and hairlines replaceSeparator, and cards are never nested. - Row titles use
text-sm font-medium, and descriptions usetext-sm text-muted-foreground. - Color carries state only: destructive for danger,
dynamic-greenfor success,dynamic-yellowordynamic-redfor warnings and errors. - Danger actions sit in a final section as a plain row with a destructive button.
.settings-surface in packages/ui/src/globals.css scopes the contrast tokens to the dialog. Dark mode’s global --border, --input, --muted and --accent share one value, which hides form controls against a panel, so settings overrides them locally and leaves the rest of the product untouched. Disabled inputs and select triggers stay readable because a disabled value, such as a user ID, is often what someone came to read or copy.
The sidebar shows group labels as plain text while the expand-all preference keeps groups open, because a chevron there would promise a toggle that does nothing. Turning the preference off restores collapsible groups. A group label that only repeats its single item is hidden.
Regression coverage: packages/ui/src/components/ui/custom/__tests__/settings-dialog-shell.test.tsx and packages/ui/src/components/ui/custom/__tests__/settings-section.test.tsx.
Accessible field rows
The section, row, footer, message, and scoped contrast patterns are designed by Khôi (@VoMinhKhoii), introduced in settings sections and contrast tokens. Reuse those exports from@tuturuuu/ui; application panels do not need copies.
SettingsField from @tuturuuu/ui/custom/settings-field composes a single
labelled control with SettingItemTab. It supplies the control ID, help-text
association, invalid state, and error association. Spread the supplied props on
the actual focusable control. Use this render function from a client form component.
Set an explicit layout so the caller does not
depend on the row’s default.
{ kind: 'valid' } or { kind: 'invalid', message }. The invalid
variant renders an alert and associates it with the control. The component does
not submit, validate, disable, or change a value. The caller owns those actions
and its explicit UI state machine. A disabled control remains disabled when the
caller passes that attribute.
This component fits a native input, textarea, or a control whose focusable trigger
accepts id, aria-describedby, and aria-invalid. It does not label a whole
multi-control group. Use a fieldset and legend for that case. For React Hook Form,
keep FormField, FormLabel, FormControl, and FormMessage from
@tuturuuu/ui/form; do not wrap them in a second label/error system.
SettingsField inherits spacing, typography, responsive control widths, and
contrast from the shared row and enclosing .settings-surface. It introduces no
new color tokens. Keep the surface on the enclosing shell. Use SettingsSection
for related fields and SettingsSectionFooter for their existing save action.
Behavior regression coverage lives in
packages/ui/src/components/ui/custom/__tests__/settings-field.test.tsx: accessible
names, combined help and error descriptions, validation recovery without losing
the draft, unique generated IDs, and disabled control preservation. These tests
do not establish browser contrast or screenshot acceptance.