Skip to content

fix(settings): stabilize loading and reuse device-scoped snapshots - #3329

Merged
GCWing merged 2 commits into
mainfrom
codex/settings-loading-cache
Oct 10, 2026
Merged

GCWing merged 2 commits into
mainfrom
codex/settings-loading-cache

Conversation

@GCWing

@GCWing GCWing commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

Settings pages now keep a stable content frame during loading, reuse successful snapshots when reopened, and restore scroll positions within the current device activation. Background reads cannot populate a newly selected device or overwrite an edited form.

Type and Areas

Type: Bug fix / UI/UX

Areas: Web UI settings, configuration services, MCP configuration, usage statistics.

Motivation / Impact

  • Reserve loading geometry immediately and retain successful content during refreshes; failed first loads remain retryable.
  • Prepare page modules and namespaces before navigation, and prefetch read-only configuration on hover/focus without starting runtime services.
  • Seed forms only from complete trusted snapshots, fence asynchronous reads and mutations by device activation, and protect MCP JSON drafts from late responses.
  • Keep page headers and content aligned and restore page scroll positions, with section links taking precedence.

Verification

  • Focused Vitest run: 50 files, 414 tests passed, covering settings navigation, retry/loading states, drafts, config caches, MCP handling, and simulated device activation/request ordering. Exact command:
pnpm --dir src/web-ui run test:run src/app/scenes/settings src/app/global-search/interactiveCapabilityActivator.test.ts src/infrastructure/config/settingsDraftRegistry.test.ts src/flow_chat/components/btw/DeepReviewActionBar.test.tsx src/infrastructure/config/components/AcpAgentsConfig.test.tsx src/infrastructure/config/components/AppearancePackageConfigSection.test.tsx src/infrastructure/config/components/common/SettingsControlSizing.test.ts src/infrastructure/config/components/common/ConfigLoadingState.test.tsx src/infrastructure/config/hooks/useConfigSeed.test.tsx src/infrastructure/config/hooks/useAIExperienceSettings.test.tsx src/infrastructure/config/hooks/useSelectionToolbarPreference.test.tsx src/infrastructure/config/services/ConfigManager.test.ts src/infrastructure/config/services/SettingsReadCache.test.ts src/infrastructure/config/services/AIExperienceConfigService.test.ts src/infrastructure/config/services/PermissionConfigService.test.ts src/infrastructure/config/components/mcpConfigForm.test.ts src/infrastructure/config/components/McpToolsConfig.test.tsx src/infrastructure/config/components/McpToolsConfig.presentation.test.ts src/infrastructure/api/service-api/MCPAPI.test.ts src/flow_chat/selection/FlowChatSelectionBar.test.tsx
  • pnpm --dir src/web-ui run test:run src/app/scenes/settings src/infrastructure/config/components/McpToolsConfig.test.tsx — passed after completing hook dependencies (32 files, 203 tests).
  • pnpm run lint:web — passed (zero errors; 10 existing warnings outside changed files).
  • pnpm --dir src/web-ui exec tsc --noEmit — passed after the dependency fixes.
  • pnpm run check:web — passed (type-check, SDK contract, typography, Appearance, theme color and visual governance contracts).
  • pnpm run motion:audit — reviewed inventory; existing unrelated SSH dialog animation entry remains.
  • node scripts/check-git-object-sizes.mjs --base origin/main --head HEAD — passed, 67 blobs checked.
  • git diff origin/main...HEAD --check — passed.

Reviewer Notes

AI-assisted; tested with focused automated source/DOM tests and Web checks. Per the user's instruction, verification used command-line tools only; no browser/computer automation or visual screenshots were used.

Remote coverage: device activation and stale response isolation were simulated in tests. Actual remote workspace (SSH/Docker), remote control (relay/mobile/bots), Peer Device Mode, and detached dispatch connections were not exercised. Runtime snapshots are in-memory and scoped to device activation; persisted fields and wire payloads retain their existing shapes.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@GCWing
GCWing merged commit ad4fb35 into main Oct 10, 2026
9 checks passed
@GCWing
GCWing deleted the codex/settings-loading-cache branch October 21, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant