You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Settings → Usage (apps/desktop/src/renderer/settings/usage-settings-page.tsx and its tabs) is still legacy-zone renderer code inside the AppShell closure. Since the renderer-architecture ratchet landed (#4088, the R1 foundation of #3439), the legacy AppShell closure is frozen: no new file may enter it, and no legacy file's dependency count may grow (only shrink).
This blocks net-new Usage functionality. Concretely, #2015 / PR #4164 (editable Runtime Host-backed pricing overrides) must add a Pricing tab inside the Usage settings page — #2015 explicitly requires it stay a Usage tab, not a new top-level Settings destination. Adding that tab forces usage-settings-page.tsx to import the pricing surface: a +1 dependency on a frozen file with no existing code to remove as an offset (unlike the Workbar/Goals extractions, whose feature import replaced removed code, netting ≤0). The ratchet correctly rejects it, and there is currently no features/usage slice to attach to.
Usage/Settings was never a tracked slice under #3439 (which covered Workbar, Goals, Module Hub, Session Navigation, Task Entry, Conversation, …). This issue tracks that missing slice.
Proposed direction
Extract the Usage settings surface into a renderer feature src/renderer/features/usage/, following the reference boundary from #3439 (model / controller / ui / ports / desktop adapter / testing):
The four existing tabs (Activity / Providers / Models / Tools), the range control, and the summary metrics move behind the feature's ports and controller.
No product, visual, IPC, storage-schema, copy, or shortcut changes. The Usage stats behavior, range persistence, and the pricing load/mutate/CAS semantics from #2015 must remain compatible.
Problem
Settings → Usage(apps/desktop/src/renderer/settings/usage-settings-page.tsxand its tabs) is still legacy-zone renderer code inside the AppShell closure. Since the renderer-architecture ratchet landed (#4088, the R1 foundation of #3439), the legacy AppShell closure is frozen: no new file may enter it, and no legacy file's dependency count may grow (only shrink).This blocks net-new Usage functionality. Concretely, #2015 / PR #4164 (editable Runtime Host-backed pricing overrides) must add a Pricing tab inside the Usage settings page — #2015 explicitly requires it stay a Usage tab, not a new top-level Settings destination. Adding that tab forces
usage-settings-page.tsxto import the pricing surface: a +1 dependency on a frozen file with no existing code to remove as an offset (unlike the Workbar/Goals extractions, whose feature import replaced removed code, netting ≤0). The ratchet correctly rejects it, and there is currently nofeatures/usageslice to attach to.Usage/Settings was never a tracked slice under #3439 (which covered Workbar, Goals, Module Hub, Session Navigation, Task Entry, Conversation, …). This issue tracks that missing slice.
Proposed direction
Extract the Usage settings surface into a renderer feature
src/renderer/features/usage/, following the reference boundary from #3439 (model / controller / ui / ports / desktop adapter / testing):usage-settings-page.tsx(legacy) delegates to the feature's public API via a single migration-dependency edge, keeping closure debt flat-or-lower.composition/desktop-feature-services.tsx; the Desktop adapter lives underplatform/desktop/.Scope
features/usage/: model/controller/ui/ports for the Usage stats surface + the Pricing override editor.compositionprovider wiring.usage-settings-page.tsxinternals.Invariants (per #3439)
No product, visual, IPC, storage-schema, copy, or shortcut changes. The Usage stats behavior, range persistence, and the pricing load/mutate/CAS semantics from #2015 must remain compatible.
Refs
Non-goals
中文摘要:
设置 → 使用统计仍是 legacy 区、被架构棘轮(#4088)冻结,无法新增依赖;而 #2015/#4164 的定价必须做成 Usage 标签页(净新增,无可抵消),于是撞墙。本 issue 跟踪按 #3439 的model/controller/ui/ports/adapter模式,把整个 Usage 设置面(4 个标签页 + 数据加载 + 定价 tab)抽取为features/usage切片,从而解除阻塞。行为/文案/IPC 不变。