Skip to content

feat(settings): add dev-only update mocks and sidebar counts - #1844

Merged
FresnelR27 merged 2 commits into
org2AI:developfrom
Harry19081:dev/settings-update-mocks
Sep 16, 2026
Merged

FresnelR27 merged 2 commits into
org2AI:developfrom
Harry19081:dev/settings-update-mocks

Conversation

@Harry19081

@Harry19081 Harry19081 commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Problem

Developers need a repeatable way to exercise update-related UI without waiting for a real release. Settings has no build-gated mock surface, and update/mock state is not visible as sidebar counts.

Solution

  • Add a localized Dev mode settings entry with an Update available switch. Build-time guards exclude navigation, direct routes and the lazy-loaded section from production access, regardless of the runtime Dev Mode preference.
  • Project a session-only mock version (99.0.0) through the shared update availability state, so sidebar and chat start-page update actions appear. Keep native updater resources untouched; mock install/confirm/later actions only control the shared dialog, without downloading, installing, restarting or saving reminders.
  • Retain the switch when leaving Settings, clear mock prompt state when disabling it, restore real update availability, and reset mocks on app restart.
  • Show Inbox-style counts beside Dev mode and General, hiding zero counts. Match icon-to-text and text-to-count spacing at 12px in both shared navigation row variants, including Inbox.
  • Include boundary/component tests and focused UI/lifecycle reports for this development testing workflow.

Potential risks

The shared update prompt and availability metadata projection also serve real updates; existing updater tests cover those paths, but an actual native install/relaunch was not performed. Shared row spacing affects every label badge and has not been visually checked across themes or narrow windows. Screenshots and native interaction checks were not captured because desktop computer control was not authorized.

Production exclusion is covered by development/production/test-mode route, navigation and state tests; a packaged production build was not executed. Mock state is per window/Jotai store and is intentionally not persisted or synchronized. There are no dependency, database, persistence-format or IPC changes. Reverting this commit removes the feature without data migration.

Verification

  • pnpm check:typed-lint — passed: 1084 existing findings, 0 new or increased findings.

CI follow-up: wrap the confirm click callback with explicit promise rejection handling, and wait for installation completion in the regression test.

  • pnpm exec eslint --no-eslintrc --config config/eslint.typed.cjs src/scaffold/AppUpdater/UpdateInstallPrompt.tsx — passed against the CI typed-lint rules.

  • pnpm test -- src/scaffold/AppUpdater/index.test.ts src/scaffold/AppUpdater/service.test.ts — 51 tests passed after the callback fix.

  • pnpm test -- src/scaffold/AppUpdater src/config/settingsDevelopment.test.ts src/config/settingsNavigation.test.ts src/modules/MainApp/Settings/sections/__tests__/DevelopmentSection.test.ts src/scaffold/NavigationSidebar/variants/SettingsSidebarCount.test.ts src/scaffold/NavigationSidebar/variants/SettingsSidebar.search.test.ts src/scaffold/NavigationSidebar/components/NavigationMenu/NavigationMenu/NavigationMenuRow.test.ts src/engines/ChatPanel/ChatPanelStartPage.test.ts — 125 tests across 16 files passed; rerun after integrating latest develop.

  • pnpm typecheck:fast — passed; commit hook also passed TypeScript checking.

  • pnpm check:test-placement — passed after moving the new settings test into the existing __tests__ directory.

  • Commit hook commands oxlint -c .oxlintrc.json --max-warnings 0, eslint --fix, and prettier --write — passed on staged source/documentation files.

  • git diff origin/develop...HEAD --check — passed. Final scope/diff inspected for unrelated changes, credentials, personal paths, debug logging and generated artifacts.

  • Native screenshots, packaged-build execution and real update installation were not run, as detailed above.

Audit

UI reports: 0 fix candidates, 5 keeps with reasons, 0 abstractions. Lifecycle review passed for bounded session state and reactive scalar counts; no background jobs were added and no CPU/RSS improvement is claimed.

@FresnelR27
FresnelR27 merged commit 0541fa5 into org2AI:develop Sep 16, 2026
14 of 15 checks passed
@Harry19081 Harry19081 added enhancement New feature or request frontend-ui Frontend UI, design system, accessibility, layout, or theming labels Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request frontend-ui Frontend UI, design system, accessibility, layout, or theming

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants