Skip to content

Add window.openAtFixedSize fixed-window-size config - #5466

Closed
austinywang wants to merge 8 commits into
mainfrom
issue-5461-fixed-window-size
Closed

austinywang wants to merge 8 commits into
mainfrom
issue-5461-fixed-window-size

Conversation

@austinywang

@austinywang austinywang commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor

Closes #5461

What

Adds an opt-in window.* config so cmux can open new main windows at a configured fixed width × height (points) instead of restoring the last-used window size — the Ghostty-like "open at fixed dimensions on launch" the issue asks for. Default off, so existing restore-last behavior is unchanged until enabled.

"window": {
  "openAtFixedSize": true,
  "width": 1280,
  "height": 800
}

cmux deliberately does not read Ghostty's window-width/window-height (those are terminal cells, which don't map to cmux's tabbed/sidebar app window). This is a dedicated cmux config in points.

Precedence

Highest first:

  1. Full session restore — a per-window frame from a saved session always wins, so restoring a multi-window layout keeps each window's exact geometry even with fixed-size on.
  2. Fixed size (window.openAtFixedSize) — overrides the source-window match and the persisted last-window geometry for every freshly created window.
  3. Source-window match (Cmd-Shift-N copies the current window's size).
  4. Persisted last-window geometry (the previous restore-last behavior).
  5. Built-in default (1000×700).

Design

The size + precedence logic is a pure, value-typed resolver in CmuxSettings (WindowOpenSizeSettings + InitialWindowFrameSource) with no AppKit dependency, so it is unit-tested without launching the app. AppDelegate maps the decision to AppKit geometry via CmuxMainWindow.fixedSizeContentRect (clamped to the visible screen, honoring sizes below the 1000×700 default), and routes fixed/default windows through center + cascade.

Wired end to end (mirrors markdown.* / browser.*)

  • web/data/cmux.schema.json + schemaDescriptions.window.* and exampleWindow* across all 20 web/messages/*.json catalogs
  • CmuxSettings catalog (WindowCatalogSection)
  • cmux.json parse (parseWindowSection), template, and supported JSON paths
  • Settings UI rows in the App section + search aliases
  • Configuration docs
  • Resources/Localizable.xcstrings (en + ja) for the new Settings strings

Tests (two-commit red → green)

  • Commit 1 adds WindowOpenSizeSettingsTests with the resolver's fixed-size branch omitted → the precedence tests go red.
  • Commit 2 adds the branch + full wiring → green.

The key assertions: with the fixed-size option enabled a new window resolves to the configured size instead of the persisted geometry; with it disabled the persisted geometry is still used; full session restore always wins. Pure package test — runs without launching the app.

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Note

Medium Risk
Touches main-window creation and launch geometry in AppDelegate; behavior is gated behind a default-off setting and covered by precedence/startup tests, but window sizing affects every user who enables it.

Overview
Adds opt-in window.* settings so new main windows can open at a fixed width × height (points) instead of restoring the last-used size. Default is off; full session restore still wins over fixed size.

Policy layer: New WindowOpenSizeSettings and InitialWindowFrameSource in CmuxSettings define precedence (session → fixed → source window → persisted geometry → default) and a startup gate so persisted geometry is not reapplied on launch when fixed size is enabled.

App behavior: createMainWindow uses the resolver; CmuxMainWindow.fixedSizeContentRect applies configured sizes (screen-clamped, no 1000×700 floor). Startup only restores persisted geometry when fixed size is disabled.

Product surface: Catalog keys, App settings UI (toggle + width/height steppers), cmux.json parse/template/schema, docs, locales, and unit tests for resolver and startup behavior.

Reviewed by Cursor Bugbot for commit b0a72e2. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Adds an opt-in window.* setting to open new main windows at a fixed width × height (points) instead of restoring the last-used size. Default is off; full session restore still wins. Also adds a startup policy gate so fixed-size windows aren’t overwritten on launch.

  • New Features

    • Added window.openAtFixedSize, window.width, window.height across cmux.schema.json, cmux.json parsing/template, Settings UI (with search anchors), docs, and all locales.
    • Implemented a pure resolver in CmuxSettings (WindowOpenSizeSettings, InitialWindowFrameSource) with precedence: session restore → fixed size → source-window match (Cmd-Shift-N) → persisted geometry → default; AppDelegate applies it via CmuxMainWindow.fixedSizeContentRect (screen-clamped, no 1000×700 floor).
  • Bug Fixes

    • On launch, stop reapplying persisted geometry when fixed-size is enabled via WindowOpenSizeSettings.shouldRestorePersistedStartupGeometry(), preventing the configured size from being clobbered.
    • Expanded tests to cover the startup gate and precedence across both create and startup paths.

Written for commit b0a72e2. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features

    • Add option to open new windows at a fixed size with toggle plus width/height controls in App settings.
  • Configuration

    • New window.openAtFixedSize, window.width, window.height supported in schema, defaults, templates and settings files.
  • Behavior

    • Initial window sizing/placement now respects the fixed-size setting and follows a clear precedence for restored, fixed, source, persisted, or fallback frames.
  • Documentation & Localization

    • Docs and many translations updated for the new window sizing options.
  • Tests

    • Added/updated tests covering sizing, parsing, precedence, and UI rows.

austinywang and others added 2 commits June 5, 2026 05:02
Introduce the pure window-open-size policy + frame-source precedence types
in CmuxSettings, plus a unit test asserting that with the fixed-size option
enabled a new window opens at the configured size instead of the persisted
last-window geometry (and that disabling it keeps persisted geometry).

The resolver intentionally omits the fixed-size branch in this commit so the
precedence test goes red; the fix commit adds the branch and wires the feature
end to end. Proves the test catches the behavior per the two-commit policy.

Issue: #5461

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Opt-in window.* config to open new main windows at a configured width × height
(points) instead of restoring the last-used window size, mirroring Ghostty's
fixed-size-on-launch behavior. Default off, so existing restore-last behavior is
unchanged until enabled.

Precedence (highest first): full session restore → fixed size → source-window
match (Cmd-Shift-N) → persisted last-window geometry → built-in default. Fixed
size overrides the source-window match and the persisted geometry for every
freshly created window, but session-restored frames still win so a saved
multi-window layout keeps each window's exact geometry.

The size/precedence logic is a pure, value-typed resolver
(WindowOpenSizeSettings + InitialWindowFrameSource) in CmuxSettings, unit-tested
without launching the app; AppDelegate maps the decision to AppKit geometry via
CmuxMainWindow.fixedSizeContentRect (clamped to the visible screen, no 1000×700
floor) and routes fixed/default windows through center + cascade.

Wired end to end like markdown.* / browser.*: web schema + descriptions,
CmuxSettings catalog, cmux.json parse + template + supported paths, Settings UI
rows (App section) + search aliases, configuration docs, and en/ja Localizable
strings. schemaDescriptions.window.* and exampleWindow* added across all 20 web
message catalogs.

Closes #5461

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment Jun 5, 2026 11:07pm
cmux-staging Building Building Preview, Comment Jun 5, 2026 11:07pm

@coderabbitai

coderabbitai Bot commented Jun 5, 2026 •

Copy link
Copy Markdown

Wondering what really moved? Review this PR in Change Stack to inspect semantic changes, definitions, and references.

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds an opt-in window sizing feature: new catalog keys and defaults, policy + precedence resolution, app delegate wiring and fixed-size content-rect helper, config parsing and template support, settings UI and localized strings, web schema/docs updates, and tests.

Changes

Fixed-size window opening configuration

Layer / File(s) Summary
Window geometry precedence model and tests
Packages/CmuxSettings/Sources/CmuxSettings/Window/InitialWindowFrameSource.swift, Packages/CmuxSettings/Sources/CmuxSettings/Window/WindowOpenSizeSettings.swift, Packages/CmuxSettings/Tests/CmuxSettingsTests/WindowOpenSizeSettingsTests.swift
InitialWindowFrameSource enum and WindowOpenSizeSettings implement storage keys, defaults, clamping, fixedContentSize(), read(from:), and deterministic resolveInitialFrameSource(...). Tests validate clamping, defaults reading, and source precedence.
Settings catalog and key registration
Packages/CmuxSettings/Sources/CmuxSettings/Keys/WindowCatalogSection.swift, Packages/CmuxSettings/Sources/CmuxSettings/Keys/SettingCatalog.swift
Introduces WindowCatalogSection with openAtFixedSize, width, and height DefaultsKeys and exposes catalog.window on SettingCatalog.
App frame resolution and fixed-size helper
Sources/AppDelegate.swift, Sources/App/CmuxMainWindow.swift
AppDelegate uses WindowOpenSizeSettings.resolveInitialFrameSource to pick an initial frame source, gates persisted-geometry when fixed-size applies, applies explicit restored/persisted frames first, and adds CmuxMainWindow.fixedSizeContentRect to compute/clamp requested content rects.
Config parsing, template, and JSON path support
Sources/KeyboardShortcutSettingsFileStore.swift, Sources/KeyboardShortcutSettingsFileStore+Template.swift, Sources/CmuxSettingsJSONPathSupport.swift
Parses new window section into managed defaults with validation/rounding, imports CmuxSettings, inserts a window block into the default template, and registers window.* JSON paths.
Settings UI, curated entries, strings, and UI tests
Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/AppSection.swift, Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Navigation/CuratedSettingEntry+Default.swift, Resources/Localizable.xcstrings, Packages/CmuxSettingsUI/Tests/CmuxSettingsUITests/SettingsRowAnchorResolutionTests.swift
Adds persisted SwiftUI state models wired to catalog.window.*, a toggle plus width/height steppers in AppSection (steppers disabled when toggle off), curated search entries, localized strings (en/ja), and updates rowConfigPaths for UI anchor tests.
Web schema, docs, and i18n message updates
web/data/cmux.schema.json, web/app/[locale]/docs/configuration/page.tsx, web/messages/*.json
Adds top-level window schema object, includes a commented window example in generated cmux.json template and section order, and updates documentation/localization strings and example keys across languages for window.openAtFixedSize, window.width, and window.height.

Sequence Diagram(s)

sequenceDiagram
  participant AppSection
  participant DefaultsStore
  participant WindowOpenSizeSettings
  participant AppDelegate
  participant CmuxMainWindow

  AppSection->>DefaultsStore: set catalog.window.openAtFixedSize / width / height
  DefaultsStore->>WindowOpenSizeSettings: read(from: defaults)
  AppDelegate->>WindowOpenSizeSettings: resolveInitialFrameSource(fixedContentSize:, restoredFrame:, sourceWindowFrame:, persistedGeometryFrame:)
  WindowOpenSizeSettings-->>AppDelegate: InitialWindowFrameSource
  AppDelegate->>CmuxMainWindow: fixedSizeContentRect(contentSize:, styleMask:) (when frameSource==fixedSize)
  CmuxMainWindow-->>AppDelegate: content rect (clamped to display)
  AppDelegate->>CmuxMainWindow: create & setFrame / positionNewMainWindow (apply resolved frame)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • Ari4ka

Poem

🐰 I nibbled keys and sprouted a plan,

Fixed-size frames, neat as a span.
From JSON seed to UI delight,
Windows open just right at first light.
Hop, set, and enjoy the sight.


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Cmux Swift File And Package Boundaries ❌ Error KeyboardShortcutSettingsFileStore.swift grew by 406 lines (1595→2001), exceeding the 250-line growth limit for files over 800 lines; budget not updated. Extract window parsing logic into a separate settings-file-parsing extension, or extract oversized mixed responsibilities from KeyboardShortcutSettingsFileStore, reducing total line count by >200 lines and updating budget file.
Docstring Coverage ⚠️ Warning Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (17 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely describes the primary change: adding a fixed-window-size configuration option via window.openAtFixedSize. It accurately summarizes the main feature being introduced.
Linked Issues check ✅ Passed The PR fully satisfies the objectives from issue #5461: implements opt-in window.* config with fixed dimensions, establishes correct precedence (session → fixed → source-window → persisted → default), adds pure testable resolver without AppKit dependency, integrates through existing config patterns, updates AppDelegate/CmuxMainWindow, adds unit/regression tests, and implements startup gate to prevent persisted geometry override.
Out of Scope Changes check ✅ Passed All changes align with the stated objectives of implementing window.openAtFixedSize feature. Changes include: core resolver logic, AppDelegate integration, Settings catalog and UI, cmux.json parsing, web schema and localization, tests, and documentation updates—all directly supporting the fixed-window-size feature.
Cmux Swift Actor Isolation ✅ Passed WindowOpenSizeSettings and InitialWindowFrameSource properly conform to Sendable. All UI and AppDelegate usage properly marked @MainActor. No actor isolation violations.
Cmux Swift Blocking Runtime ✅ Passed No blocking synchronization patterns found in new code: no semaphores, Task.sleep, blocking waits, main-queue sync, or polling. All additions are pure functions and value types.
Cmux No Hacky Sleeps ✅ Passed No hacky sleeps, setTimeout, setInterval, polling, or timing-based race workarounds found in non-Swift production code. Only static configuration updates.
Cmux Algorithmic Complexity ✅ Passed All new code is O(1): resolveInitialFrameSource uses if-let chain and switch, fixedContentSize does arithmetic, read accesses 3 UserDefaults keys. No loops, collection scans, or unbounded operations.
Cmux Swift Concurrency ✅ Passed All new code uses pure synchronous functions with Sendable conformance. No DispatchQueue.global(), fire-and-forget Tasks, or new Combine patterns. Pre-existing Combine code unchanged.
Cmux Swift @Concurrent ✅ Passed New code adds pure synchronous value-typed helpers without async functions, nonisolated async work, or @concurrent annotations. All integration within existing @MainActor context.
Cmux Swift Logging ✅ Passed No logging violations: new code avoids print/NSLog; logger uses unified logging with nonisolated private declaration and sensitive data redaction.
Cmux User-Facing Error Privacy ✅ Passed Window sizing feature uses only safe product terminology (fixed size, points, sessions); no vendor names, credentials, environment variables, or implementation details exposed in user-facing text.
Cmux Full Internationalization ✅ Passed Swift UI uses String(localized:) with full translations in all 20 app locales; web config includes window strings in all 20 locales per next-intl pattern; no hardcoded user-facing text found.
Cmux Swiftui State Layout ✅ Passed Three new @State properties with @Observable DefaultsValueModel follow the modern pattern and match existing state properties in AppSection with proper bindings.
Cmux Architecture Rethink ✅ Passed Pure value-typed WindowOpenSizeSettings with explicit precedence. Single source of truth via UserDefaults. No timing, observers, or duplicate state. Decision logic testable without AppKit.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PR modifies sizing logic for existing CmuxMainWindow (main workspace window), which is explicitly allowed; no new auxiliary windows added.
Cmux Source Artifacts ✅ Passed All 35 changed files are legitimate hand-written source, tests, configs, or localization catalogs. No forbidden artifacts (tool output, logs, temp folders, caches, build output) detected.
Description check ✅ Passed The pull request description comprehensively covers all required template sections with clear summaries, technical details, and testing approach.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-5461-fixed-window-size

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread Sources/AppDelegate.swift
@greptile-apps

greptile-apps Bot commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds an opt-in window.openAtFixedSize setting that lets cmux open new main windows at a user-configured fixed width × height (in points) instead of restoring the last-used size. The feature is default-off and full session restore continues to win over fixed size.

  • Introduces WindowOpenSizeSettings and InitialWindowFrameSource as a pure, @MainActor-free precedence resolver (restored → fixed → source-window → persisted geometry → default) tested without launching the app; AppDelegate.createMainWindow maps the resolved case to AppKit geometry via CmuxMainWindow.fixedSizeContentRect, and the startup restore gate now skips re-applying persisted geometry when fixed size is on.
  • Wires the setting end-to-end through WindowCatalogSection, parseWindowSection, Settings UI (toggle + width/height steppers), cmux.schema.json, the config template, JSON-path support, curated-entry search anchors, and documentation.
  • All 20 app locales in Localizable.xcstrings and all 20 web locale files in web/messages/ receive the new strings, satisfying the full-i18n requirement.

Confidence Score: 5/5

Safe to merge — the feature is default-off, session restore continues to win, and the precedence logic is covered by unit tests that run without launching the app.

The resolver is a pure value-type function with no AppKit dependency, tested across all five precedence branches. The two AppKit integration points (fixedSizeContentRect and the startup geometry guard) follow the existing patterns for defaultContentRect and the session-restore gate. Managed UserDefaults written by parseWindowSection flow through UserDefaults.standard, which WindowOpenSizeSettings.read(from: .standard) correctly reads. i18n is complete across all 20 locales in both the app string catalog and the web messages directory.

No files require special attention.

Important Files Changed

Filename Overview
Packages/CmuxSettings/Sources/CmuxSettings/Window/WindowOpenSizeSettings.swift New pure resolver struct; correct precedence, proper clamping, UserDefaults reads from .standard which the managed-defaults machinery writes to.
Packages/CmuxSettings/Sources/CmuxSettings/Window/InitialWindowFrameSource.swift Clean Sendable enum covering all five precedence cases; well-documented.
Sources/AppDelegate.swift Two targeted changes: startup-restore guard now conditioned on shouldRestorePersistedStartupGeometry(), and createMainWindow refactored to switch on InitialWindowFrameSource; logic is correct and precedence is preserved.
Sources/App/CmuxMainWindow.swift New fixedSizeContentRect mirrors the pattern of defaultContentRect, clamping to NSScreen.main visibleFrame with no 1000×700 floor as intended.
Sources/KeyboardShortcutSettingsFileStore.swift parseWindowSection and parseWindowDimension follow established patterns; dimension values are validated in-range and stored as .int, consistent with the catalog type.
Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/AppSection.swift Three new @State DefaultsValueModel bindings follow the existing pattern; steppers are correctly range-clamped (300–10 000) and disabled when toggle is off.
Packages/CmuxSettings/Tests/CmuxSettingsTests/WindowOpenSizeSettingsTests.swift Good coverage of the precedence resolver and both application entrypoints; uses isolated UserDefaults suites cleaned up before and after.
Resources/Localizable.xcstrings All 6 new string keys translated across all 20 app locales (en, ja, ar, bs, da, de, es, fr, it, km, ko, nb, pl, pt-BR, ru, th, tr, uk, zh-Hans, zh-Hant).
web/data/cmux.schema.json New window object with correct type, min/max, and default values matching Swift constants.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[createMainWindow called] --> B{restoredFrame from session?}
    B -- Yes --> C[".restored(frame)"]
    B -- No --> D{openAtFixedSize enabled?}
    D -- Yes --> E[".fixedSize(configuredSize)"]
    D -- No --> F{sourceWindow exists?}
    F -- Yes --> G[".sourceWindow(frame)"]
    F -- No --> H{persistedGeometry exists?}
    H -- Yes --> I[".persistedGeometry(frame)"]
    H -- No --> J[".fallbackDefault"]
    C --> K["window.setFrame(restoredFrame)"]
    E --> L["fixedSizeContentRect → center + cascade"]
    G --> M["contentRect from sourceFrame → positionNewMainWindow"]
    I --> N["window.setFrame(persistedFrame)"]
    J --> O["defaultContentRect → center + cascade"]
    P[App launch startup path] --> Q{full session restore?}
    Q -- Yes --> R[restore session windows]
    Q -- No --> S{shouldRestorePersistedStartupGeometry?}
    S -- false: openAtFixedSize=on --> T[skip — window already at fixed size]
    S -- true: openAtFixedSize=off --> U[apply persisted geometry to primary window]
Loading

Reviews (6): Last reviewed commit: "Capture startup-overwrite regression beh..." | Re-trigger Greptile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/messages/de.json`:
- Around line 743-747: The German locale file web/messages/de.json contains
new/updated user-facing strings still in English (keys like
schemaDescriptions.window.openAtFixedSize, schemaDescriptions.window.width,
schemaDescriptions.window.height and related exampleWindow* and
exampleMarkdownMaxWidth entries); replace those English strings with proper
German translations matching the other locale catalogs so the de.json is fully
localized and consistent (update the values for schemaDescriptions.window.*,
exampleWindow*, exampleMarkdownMaxWidth to their German equivalents and verify
similar entries at lines referenced like 752-755 are also translated).

In `@web/messages/es.json`:
- Around line 744-746: The Spanish locale file still contains English text for
the docs.configuration keys; update the values for "openAtFixedSize", "width",
and "height" in web/messages/es.json to proper Spanish translations (and
likewise fix the other newly added docs.configuration entries referenced around
the same area, e.g., the keys noted near lines 752-755) so the Spanish docs
render fully localized; locate the keys "openAtFixedSize", "width", and "height"
in the JSON and replace the English strings with accurate Spanish equivalents.

In `@web/messages/fr.json`:
- Around line 743-756: Replace the English strings added under the French
localization with proper French translations: update
schemaDescriptions.window.openAtFixedSize, schemaDescriptions.window.width,
schemaDescriptions.window.height and the example keys
exampleWindowOpenAtFixedSize, exampleWindowWidth, exampleWindowHeight (and
ensure exampleMarkdownFontSize/FontFamily/FontSizeZoom remain correctly
localized if applicable) by providing native French text matching the rest of
fr.json style; locate those keys in the diff and replace the English sentences
with concise French equivalents preserving placeholders/units (e.g., "Ouvrir les
nouvelles fenêtres à la largeur et hauteur fixes ci‑dessous..." for
openAtFixedSize, "Largeur de fenêtre fixe, en points..." for width, etc.).

In `@web/messages/no.json`:
- Around line 743-746: Replace the English strings for the docs.configuration
"window" entries in the Norwegian locale with proper Norwegian translations:
update "window.openAtFixedSize" to a Norwegian sentence (e.g., "Åpne nye vinduer
med fast bredde og høyde som angitt nedenfor i stedet for å gjenopprette siste
brukte vindusstørrelse. Vinduer gjenopprettet fra en lagret økt bevarer sin egen
størrelse."), "window.width" to something like "Fast vindusbredde i punkter som
brukes når openAtFixedSize er aktivert.", and "window.height" to "Fast
vindushøyde i punkter som brukes når openAtFixedSize er aktivert."; also scan
the nearby entries referenced in the comment (the other strings around the same
block) and translate those (lines noted as 753–755) so the Norwegian locale
contains no remaining English fallbacks.

In `@web/messages/pt-BR.json`:
- Around line 743-746: The pt-BR locale is missing Portuguese text for the
window configuration entries; replace the English strings with native Portuguese
translations for the keys
configuration.schemaDescriptions.window.openAtFixedSize,
configuration.schemaDescriptions.window.width,
configuration.schemaDescriptions.window.height and the example keys
configuration.exampleWindowOpenAtFixedSize, configuration.exampleWindowWidth,
configuration.exampleWindowHeight (also update the same entries around lines
754-756) by providing the corresponding Portuguese copy for each string so all
user-facing messages in web/messages/pt-BR.json are translated.

In `@web/messages/ru.json`:
- Around line 743-746: The new Russian locale entries for docs.configuration are
still in English; update the Russian file entries for schemaDescriptions.window
keys ("openAtFixedSize", "width", "height") and the example keys referenced as
"exampleWindow*" and "exampleMarkdownMaxWidth" to proper Russian translations so
the ru.json no longer contains English fallback text; locate those keys in
web/messages/ru.json (the "window" block and the example* keys) and replace the
English strings with accurate Russian translations consistent with other locale
phrasing.

In `@web/messages/uk.json`:
- Around line 743-747: The Ukrainian locale file currently contains untranslated
English entries for the window schema keys—specifically the "window" object and
its properties "openAtFixedSize", "width", "height" (and the related
"exampleWindow*" entries)—which causes mixed-language UI text; update
web/messages/uk.json by translating those keys' values into Ukrainian
(preserving the JSON keys exactly: window.openAtFixedSize, window.width,
window.height and any exampleWindow* keys) so the Ukrainian catalog provides
full i18n coverage for these user-facing strings.

In `@web/messages/zh-CN.json`:
- Around line 743-746: The Simplified Chinese locale file left the new
window-related keys untranslated; update the zh-CN.json entries for the "window"
object—specifically "openAtFixedSize", "width", and "height"—to provide proper
Chinese translations matching the user-facing English text so the configuration
UI is fully localized (also apply the same fix for the other missing entries
referenced at lines 753–755).

In `@web/messages/zh-TW.json`:
- Around line 743-746: The new "window" localization block in
web/messages/zh-TW.json contains English values for the keys "openAtFixedSize",
"width", and "height"; translate those three strings into Traditional Chinese
and replace the English text for the corresponding keys (also update the
duplicate entries referenced around lines 753–755) so the zh-TW locale contains
fully localized copy for "window.openAtFixedSize", "window.width", and
"window.height".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4e35906c-9aaa-4a6b-81a1-cf20a97fa6a0

📥 Commits

Reviewing files that changed from the base of the PR and between 0575866 and 47410e7.

📒 Files selected for processing (35)
  • Packages/CmuxSettings/Sources/CmuxSettings/Keys/SettingCatalog.swift
  • Packages/CmuxSettings/Sources/CmuxSettings/Keys/WindowCatalogSection.swift
  • Packages/CmuxSettings/Sources/CmuxSettings/Window/InitialWindowFrameSource.swift
  • Packages/CmuxSettings/Sources/CmuxSettings/Window/WindowOpenSizeSettings.swift
  • Packages/CmuxSettings/Tests/CmuxSettingsTests/WindowOpenSizeSettingsTests.swift
  • Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Navigation/CuratedSettingEntry+Default.swift
  • Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/AppSection.swift
  • Resources/Localizable.xcstrings
  • Sources/App/CmuxMainWindow.swift
  • Sources/AppDelegate.swift
  • Sources/CmuxSettingsJSONPathSupport.swift
  • Sources/KeyboardShortcutSettingsFileStore+Template.swift
  • Sources/KeyboardShortcutSettingsFileStore.swift
  • web/app/[locale]/docs/configuration/page.tsx
  • web/data/cmux.schema.json
  • web/messages/ar.json
  • web/messages/bs.json
  • web/messages/da.json
  • web/messages/de.json
  • web/messages/en.json
  • web/messages/es.json
  • web/messages/fr.json
  • web/messages/it.json
  • web/messages/ja.json
  • web/messages/km.json
  • web/messages/ko.json
  • web/messages/no.json
  • web/messages/pl.json
  • web/messages/pt-BR.json
  • web/messages/ru.json
  • web/messages/th.json
  • web/messages/tr.json
  • web/messages/uk.json
  • web/messages/zh-CN.json
  • web/messages/zh-TW.json

Comment thread web/messages/de.json
Comment thread web/messages/es.json Outdated
Comment thread web/messages/fr.json
Comment thread web/messages/no.json Outdated
Comment thread web/messages/pt-BR.json Outdated
Comment thread web/messages/ru.json Outdated
Comment thread web/messages/uk.json
Comment thread web/messages/zh-CN.json Outdated
Comment thread web/messages/zh-TW.json Outdated
The three new window.* Settings rows add curated search entries, which the
everyCuratedSettingEntryIsReachable test requires to map to a scrollable row
anchor. Add window.openAtFixedSize/width/height to rowConfigPaths so the
search results resolve to their rows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6a8d582. Configure here.

Comment thread Sources/AppDelegate.swift
Comment thread Resources/Localizable.xcstrings
austinywang and others added 2 commits June 5, 2026 15:02
- Startup session restore reapplied the persisted last-window geometry onto
  the primary window even when window.openAtFixedSize was on, clobbering the
  fixed dimensions createMainWindow had just set. Gate the persisted-geometry
  reapply on the fixed-size option being off so a fixed-size launch keeps the
  configured size. (Cursor Bugbot, medium.)
- Translate the new window.* schema descriptions and example strings from
  English placeholders into all 18 non-en/ja web message catalogs. (CodeRabbit.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add translations for the three new window.* Settings rows (titles +
subtitles) to every app locale in Localizable.xcstrings, matching the
full-locale-set entries rather than the en/ja-only stubs. (Greptile.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/messages/th.json`:
- Line 753: The Thai translation for the key exampleWindowOpenAtFixedSize omits
the required “restored sessions keep their own window size” clause; update the
string for exampleWindowOpenAtFixedSize to include the equivalent Thai wording
for that rule so it matches the schemaDescriptions.window.* and other
exampleWindow* keys (i.e., append or integrate the phrase stating restored
sessions retain their own window size into the existing Thai sentence for
exampleWindowOpenAtFixedSize).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0256bec1-cf08-4156-93db-4610fb3919e7

📥 Commits

Reviewing files that changed from the base of the PR and between 6a8d582 and b93947a.

📒 Files selected for processing (19)
  • Sources/AppDelegate.swift
  • web/messages/ar.json
  • web/messages/bs.json
  • web/messages/da.json
  • web/messages/de.json
  • web/messages/es.json
  • web/messages/fr.json
  • web/messages/it.json
  • web/messages/km.json
  • web/messages/ko.json
  • web/messages/no.json
  • web/messages/pl.json
  • web/messages/pt-BR.json
  • web/messages/ru.json
  • web/messages/th.json
  • web/messages/tr.json
  • web/messages/uk.json
  • web/messages/zh-CN.json
  • web/messages/zh-TW.json

Comment thread web/messages/th.json
austinywang and others added 3 commits June 5, 2026 15:48
Extract the startup persisted-geometry reapply decision into a pure,
testable WindowOpenSizeSettings.shouldRestorePersistedStartupGeometry()
and use it from AppDelegate, so both window-sizing entrypoints share one
policy path. Add regression tests asserting that with the fixed-size
option on, startup does NOT reapply persisted geometry (the bug Cursor
caught), and that both entrypoints honor the fixed size over persisted
geometry. Verified the tests go red when the gate is removed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lawrencecchen lawrencecchen added the stale-revisit Closed after 30+ days without activity; preserved for possible revisit or reopening. label Sep 23, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in cmux backlog Sep 23, 2026

This branch was successfully deployed

1 active deployment
Preview – cmux — b0a72e2c Deployed Jun 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale-revisit Closed after 30+ days without activity; preserved for possible revisit or reopening.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: config to open windows at fixed/configured dimensions instead of restoring the last size

3 participants