Desktop Material

Tab-strip settings commit chip

The repository tab strip's trailing cluster carries the signature per-account settings-repo feedback from the v2 design: a persistent commit chip, a Settings-history entry point, and undo/redo controls that dim when there is nothing to act on. Together they make the account's local settings repository visible without opening a dialog.

Behavior and configuration

The trailing cluster renders, left to right: the notification bell, the commit chip, undo, redo, and the Settings-history button.

All labels ship in English, playful Hong Kong Cantonese, and the compact bilingual mode through the shared translation catalog.

Persistence

This surface owns no persistence. It presents state that already lives in the per-account settings repository. The tab store exposes a read-only ISettingsCommitSummary (sha, shortSha, canUndo, canRedo) obtained from the same profile-history read the settings-history dialog performs, and emits a dedicated did-update-settings-commit event only when that summary actually changes. Commit, undo, redo, and restore semantics are untouched — the chip is presentation and wiring only.

Failure modes and recovery

The summary refresh is defensive: against a disabled or history-less profile store it is a no-op, leaving the chip at Saved · — with undo and redo disabled. Refreshes triggered by tab activity are debounced past the profile store's own commit window so the read observes the naturally committed HEAD and never forces an early flush that would split batched changes. A failed history read is logged and leaves the previous summary in place. Pulse and refresh timers plus the summary subscription are disposed on unmount.

Because the refresh is driven by tab-store updates, undo/redo, and mount, a settings-only change made elsewhere (for example a Preferences toggle) is reflected on the next tab-store update rather than instantly.

Security considerations

The chip renders an abbreviated commit sha and localized static copy only; it never displays repository contents, credentials, or paths. The Settings-history button dispatches an internal popup type and performs no navigation to externally supplied targets.

Verification

repository-tab-sha-chip-test.tsx covers the rendered short sha, the pulse and Committed label on a new commit event, pulse clearing on animationend, suppression under reduced motion, undo/redo disabled state following the store, and the Settings-history button dispatching the SettingsHistory popup. Its store-level block covers the summary read, change-only notification, and the no-op path when the profile store lacks history support.