description, kind
| description | kind |
|---|---|
| Settings shell, ownerless copy, and durable product-onboarding namespace for the dsh web client: the General section, trigger chrome, and onboarding ledger projection. | package-reference |
@deepseek-ai/dsh-client-ui-settings-general
English | 中文
Summary
Use this package to give the dsh web client a Settings panel, connection-recovery control, feature-contributed navigation, and sequential first-run onboarding. Users can open it from the sidebar, retry a failed connection immediately, and access a local configuration file when the Host makes one available on a loopback browser. Feature packages supply their own settings rows, sections, and onboarding steps; this package supplies their shared presentation and the Developer tools switch without adding onboarding copy.
Table of Contents
- Use this package
- Understand the implementation
- Further Exploration
- Model Experience
- Known Limitations and Deferred Work
- Dev Note
Use this package
Users reach the shell through the sidebar's bottom Settings control; feature plugins contribute their pages and onboarding steps through the slot ledgers this shell projects. In both the expanded sidebar and collapsed rail, the control exposes the localized Settings label as its accessible name. A pale-yellow Disconnected action beside Settings indicates browser offline suspension; its permanent retry glyph marks the retry action, which the Chinese outage copy also names (连接异常,刷新重试). Every recovery attempt shows the shared ongoing loader beside Reconnecting with one to three dots advancing every 500ms, and an attempt stays visible for at least 800ms so brief retries do not flicker. Selecting either yellow state starts an immediate retry; press feedback stays within the warning palette. Recovery changes the region to pale-green Connected for two seconds from the moment the green pill becomes visible. The pill fades in on appearance, fades out over 150ms on removal, and sizes to its current label. Initial startup and uninterrupted healthy operation remain silent. The shell renders the modal panel, the navigation built from settings.section entries, and exactly one mounted onboarding step at a time.
When the section navigation exceeds the panel's available height, the list scrolls independently of the settings content and keeps the Settings title fixed.
In Desktop, the account-row update control shows availability, progress, verification, readiness, and persistent retry feedback. The preload carries semantic phase, version, progress, and classified failures; the component resolves every visible and accessible string from the active settings locale, including after an in-application language change. Selecting an available update starts downloading; installation requires a separate shell-owned confirmation. A collapsed sidebar shows the same status as a dot on its top expand button. Connection feedback takes priority except during shell-reported installation, when the expected backend disconnect must not hide update status. Failure restores connection feedback. Both controls share one carrier subscription; browser code cannot choose packages or authorize installation. Desktop updates owns the release workflow.
The General section
The Developer tools switch controls the shared preference described by ui-settings. It is available in both Web and desktop, follows accepted changes immediately, and disables duplicate input while a write settles. A failed write displays localized retry guidance.
The General section holds the built-in Developer tools row and rows registered into settings.general.item by feature packages. Each registrant owns its row copy and behavior. The Appearance row, for example, lives in ui-theme.
Opening the configuration file
On a loopback browser, the shell renders Open configuration file only when the Host confirms that a provider-owned local document can be prepared. The action opens that document in the native text editor (bypassing the browser file association on macOS). Remote browsers never register the action and never issue the privileged settings read.
Onboarding steps
The onboarding ledger projects in ascending order and mounts exactly one step at a time. Registrants own durable completion, capability readiness, copy, mutations, and their visible wrapper, so independently registered flows cannot stack and the shell does not become a second configuration fact source. Visible steps own their dialog chrome and app-root inert lifecycle.
Understand the implementation
Implementation internals — click to expand
The shell owns the chrome and the projections; it contributes the Developer tools row, while feature registrants own their additional content and copy.
Ledger projections
The navigation is a projection of the settings.section ledger; nav labels may be locale-following thunks, resolved through resolveSlotLabel and re-rendered on the section ledger bump or the locale revision (an optional ctx.get('locale') read; no hard locale dependency). The onboarding ledger projects in ascending order; the active registrant receives its id, complete(), and an openSection(id) callback, and completing or skipping transfers ownership to the next entry.
Connection recovery
The shell is an explicit recovery consumer, so it injects Connection directly rather than adding lifecycle controls to ctx.remote. Its private hooks compartment binds ctx.connection.state, while the component receives only the selected state and an injected callback for ctx.connection.reconnect(). ConnectionIndicator owns the inline presentation and receives all visible and accessible copy from the settings locale namespace; the shell owns the 800ms minimum-visible hold for the connecting state and the two-second recovered-state timer, which starts when the recovered pill becomes visible after the hold.
Document availability
On a loopback page, the Client loads the provider's hasDocument capability through settings/describe and renders Open configuration file only when the Host confirms that a provider-owned local document can be prepared. The action calls the pathless, browser-authenticated settings/openSettingsDocument Remote; the Host resolves the provider path again, materializes an absent document, and hands it to a native text editor (open -t on macOS, bypassing a browser file association; the desktop file association on Linux and Windows; Windows association after wslpath -w translation on WSL). Open failures keep the action available and render a localized error. Reopening the dialog or reconnecting refreshes availability after a transient read failure or Host topology change. Non-loopback pages retain the Client policy that withholds this native action and its settings read.
Host half
The Host half registers ui-onboarding in the user-settings seam. The welcome step contributed by ui-settings-models reads and writes its welcomeNoticeVersion through the existing public settings boundary; the shell itself remains policy-free.
Further Exploration
These pages cover the settings surface family and the composition model.
- ui-settings — the domain base whose slot types and scope service this shell builds on.
- ui-sidebar — the sidebar shell hosting the
sidebar.settingsseat. - ui-settings-models — the feature package contributing the DeepSeek onboarding step.
- settings — the durable user-settings seam and its file provider.
- Slot system standard — the composition model behind the ledgers.
Model Experience
None, as the package is a browser-side UI plugin layer that registers nothing model-facing.
KV Cache effect
None; this package neither assembles nor sends a provider request.
Known Limitations and Deferred Work
These limits define what the shell itself provides versus what features must supply; they are current package constraints.
- Additional General rows require their feature plugins — the shell supplies Developer tools; feature plugins supply the remaining preferences.
- The Windows caption badge keeps a side-opening bubble —
DesktopUpdateBadgeoccupiessidebar.toggle.badgein the caption and requestsside="right", so the Desktop-owned menu text can cover its bubble while the sidebar is collapsed on Windows; the sidebar toggle and New Session bubbles open below the caption instead (#4688).
Dev Note
Working context for maintainers — click to expand
None.
Runtime invariant: No companion is published. The settings seam validates and publishes the durable onboarding section, while slot conflicts fail loud in the slot core. The local document action is browser state over typed RPC responses and is covered by store/component tests rather than a Cordis runtime relationship.