Skip to content

[Feat] Developer mode Easter egg via version number tap#172

Merged
samzong merged 1 commit intomainfrom
feat/dev-mode-easter-egg
Mar 25, 2026
Merged

[Feat] Developer mode Easter egg via version number tap#172
samzong merged 1 commit intomainfrom
feat/dev-mode-easter-egg

Conversation

@samzong
Copy link
Copy Markdown
Collaborator

@samzong samzong commented Mar 25, 2026

Summary

Add a hidden developer mode activated by tapping the version number 5 times in Settings > About (Android-style Easter egg). Remove the always-on dev screenshot feature. DevTools and Reload menu items are now only visible when developer mode is enabled or running in dev mode.

Type of change

  • [Feat] new feature

Why is this needed?

Production users should not see DevTools/Reload in the View menu by default, but power users and developers need a way to access them without building from source. The previous screenshot-on-startup behavior was unnecessary dev noise.

What changed?

  • Removed captureScreenshot, setupDevScreenshot, SCREENSHOT_PATH, and writeFileSync import from main process
  • buildAppMenu now accepts a devMode flag; Reload and Toggle DevTools are only shown when devMode || is.dev
  • Added app:rebuild-menu IPC so the renderer can trigger a menu rebuild after toggling developer mode
  • Added devMode?: boolean to AppConfig, AppSettings, preload bridge, and Zustand UI store
  • AboutSection.tsx: tapping the version number 5 times within 3 seconds enables developer mode with toast feedback; once enabled, a "Disable" button appears
  • App.tsx: loads devMode from persisted settings on startup
  • Added i18n keys (devMode, devModeSteps, devModeEnabled, devModeDisabled, devModeDisable) across all 8 locales

Architecture impact

  • Owning layer: main / preload / renderer
  • Cross-layer impact: yes — new app:rebuild-menu IPC channel from renderer to main to rebuild the native menu when developer mode is toggled
  • Invariants touched from docs/architecture-invariants.md: none
  • Why those invariants remain protected: the new IPC is read-only config access + menu rebuild, no message persistence or session state involved

Linked issues

Closes #

Validation

  • pnpm lint
  • pnpm test
  • pnpm check:ui-contract
  • pnpm check (full suite: lint, architecture, ui-contract, renderer-copy, i18n, format, typecheck, test)
  • pnpm build
  • Manual smoke test
pnpm check — all 92 tests passed, all checks green

Screenshots or recordings

No UI layout changes. The version number span gains a click handler (no visual change). When developer mode is active, a new "Developer Mode / Disable" row appears below the version row in About section.

Release note

  • User-facing change. Release note is included below.
Added developer mode: tap the version number 5 times in Settings > About to reveal DevTools and Reload in the View menu. Removed automatic screenshot capture on dev startup.

Checklist

  • The PR title uses at least one approved prefix: [Feat]
  • The summary explains both what changed and why
  • Validation reflects the commands actually run for this PR
  • Architecture impact is described and references any touched invariants
  • Cross-layer changes are explicitly justified
  • The release note block is accurate

Remove the always-on dev screenshot capture and hide DevTools/Reload
menu items behind a persistent developer mode flag.  Tapping the
version number 5 times in the About section enables developer mode,
which is persisted to config.json and rebuilds the app menu to
expose Reload and Toggle DevTools.
@github-actions
Copy link
Copy Markdown
Contributor

Hi @samzong,
Thanks for your pull request!
If the PR is ready, use the /auto-cc command to assign Reviewer to Review.
We will review it shortly.

Details

Instructions for interacting with me using comments are available here.
If you have questions or suggestions related to my behavior, please file an issue against the gh-ci-bot repository.

@samzong samzong merged commit 2c360c1 into main Mar 25, 2026
6 checks passed
@samzong samzong deleted the feat/dev-mode-easter-egg branch March 29, 2026 14:11
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