Skip to content

feat(browser): persist browser presentation preferences #30

Closed

Description

@trmosala

Problem

Per-site zoom and reusable device presets are not managed as persistent preferences.

Implementation order

Browser backlog item 26 of 29. Phase: Optional conveniences. This is ordered planning, not a claim that Codex implements every item. Items 24–29 are optional additions.

Acceptance criteria

  • Persist supported per-site zoom and named device presets.
  • Apply/reset settings consistently across navigation and new tabs.
  • Test origin matching, recovery and preview exit.

Dependencies

Engineering and validation

Reuse existing Chromium/Electron/OS facilities where available. Preserve main-process ownership and permission enforcement, add no placeholder controls, use existing i18n patterns, and test behavior with synthetic fixtures. Document platform limitations. Baseline: browser-tabs at 47fef3e; see packages/cm-browser/README.md and password-security.md.

Activity

  1. trmosala commented on Sep 18, 2026

    @trmosala
    OwnerAuthor

    Implemented and published in 82eabea31 (feat(browser): persist presentation preferences).

    Behavior:

    • Zoom is persisted by exact HTTP(S) origin, including port, and is applied to matching open tabs, subsequent navigation, fresh tabs, and recovered tabs. Navigating to an origin without a rule restores 100%; Reset removes the current rule. Menu and keyboard zoom use the same path.
    • Device sizes can be saved, updated, selected, and deleted as named presets. Presets persist in the private browser profile; preview enablement remains per-tab and recovery-safe.
    • Fresh/reopened/recovered tabs never resume device emulation. Hiding the toolbar disables Electron emulation and restores the native viewport.
    • Persisted collections are bounded and validated: 200 zoom origins, 20 device presets, unique names, 80-character names, and existing 160–4096 CSS-pixel bounds. Malformed stored collections display empty and cannot be overwritten through the commands.
    • Chromium identity is preserved. Touch/device-sensor emulation remains outside Electron's supported preview API and is documented.

    Verification on Windows / Electron 44.3.0 / Chromium 152.0.7977.78:

    • focused native --presentation-preferences: PASS (exact-origin/port matching, navigation reset, fresh tab, recovery, preset persistence, preview exit)
    • full isolated native smoke: PASS
    • desktop browser suite: 187 passed / 2,573 expectations
    • mounted browser preview/settings: 2 passed / 163 expectations
    • desktop and app typechecks: PASS
    • scoped oxlint: 0 errors (existing warnings remain)
    • pre-push workspace typechecks: 31/31 PASS

    The native fixture uses disposable loopback pages and a disposable profile. No installed CookieMonster process or bridge was restarted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions