Skip to content

spec: per-window zoom level (#10115)#10498

Open
lonexreb wants to merge 4 commits intowarpdotdev:masterfrom
lonexreb:spec/10115-per-window-zoom
Open

spec: per-window zoom level (#10115)#10498
lonexreb wants to merge 4 commits intowarpdotdev:masterfrom
lonexreb:spec/10115-per-window-zoom

Conversation

@lonexreb
Copy link
Copy Markdown
Contributor

@lonexreb lonexreb commented May 8, 2026

Spec-only PR for #10115 — independent zoom level per window.

Summary

Today Cmd + / Cmd - / Cmd 0 (and Command Palette zoom actions) mutate a single global zoom value, so every open Warp window re-renders simultaneously. This spec scopes those actions to the focused window only. Tabs and splits inside a window continue to share that window's zoom — the scope is per-window, not per-pane.

Scope (V1)

  • Zoom actions affect ONLY the focused window's zoom-level state.
  • New windows inherit the user's global zoom default from Settings → Appearance → Zoom.
  • All tabs and splits inside a window share that window's zoom.
  • In-memory only — closing and reopening the app resets all windows to the global default. (The issue author explicitly allowed this for V1.)
  • Settings label updated to "Default zoom for new windows" to disambiguate.
  • New "Apply to all open windows" button next to the setting for users who want a fast resync.

Non-Goals

  • Per-pane / per-tab zoom inside a single window.
  • Per-monitor adaptive zoom.
  • Persisting per-window zoom across restart (V1.5 candidate).

Spec document

specs/GH10115/SPEC.md — full Behavior Contract (B1–B7), Acceptance Criteria (A1–A8), Implementation Pointers verified against the codebase (crates/warpui_core/src/zoom.rs, app/src/appearance.rs, app/src/settings_view/appearance_page.rs), Tests (T1–T8), Open Questions, and Telemetry notes.

Labels

ready-to-spec

@cla-bot cla-bot Bot added the cla-signed label May 8, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 8, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 8, 2026

@lonexreb

I'm starting a first review of this spec-only pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This spec defines a per-window zoom model, keeps the persisted setting as the default for new windows, and covers the main shortcuts, settings behavior, acceptance criteria, implementation pointers, and tests. No design-level security findings were identified for this local UI-state change.

Concerns

  • Pinch/trackpad zoom is internally inconsistent: it is excluded as a non-goal but later left open to include in V1 if it is not already focused-window-scoped.
  • Two coverage clarifications would make the spec easier to implement and verify: whether the "Apply to all open windows" control is required, and how tab moves between windows are tested.

Verdict

Found: 0 critical, 1 important, 2 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread specs/GH10115/SPEC.md Outdated
- Per-monitor adaptive zoom that auto-scales when a window moves between displays.
- Persisting per-window zoom across app restart (V1.5 candidate — see Open Questions).
- Changing the underlying zoom mechanism, range, or step size.
- Touch / trackpad pinch-zoom semantics (already focused-window-scoped where supported).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] Pinch/trackpad zoom is listed as a non-goal here, but the open question says to fold it into V1 if it is not already focused-window-scoped; resolve this before implementation by either verifying it and removing the open question or moving it into V1 scope/tests.

Comment thread specs/GH10115/SPEC.md Outdated
- New windows open at the user's global zoom default (the value in Settings → Appearance → Zoom).
- All tabs and splits inside a single window share that window's zoom level. Switching tab or focused split inside the same window does not change the zoom.
- The Settings → Appearance → Zoom UI label is updated to disambiguate it as the default for new windows, not a global override.
- Optional one-shot "Apply to all open windows" button gives users a fast escape hatch when they want to re-sync everything.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 [SUGGESTION] "Optional" conflicts with B6/A7 treating the button as required; either remove "Optional" or explicitly mark the button as a non-blocking enhancement.

Comment thread specs/GH10115/SPEC.md Outdated

### B3. Tabs and splits share window zoom

All tabs and splits inside a window share that window's zoom-level value. Creating a new tab or split, switching the active tab, or moving focus between splits does not change the rendered zoom. Moving a tab to a different window adopts the destination window's zoom.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 [SUGGESTION] B3 defines moved tabs adopting the destination window's zoom, but the acceptance criteria/tests never cover tab moves; add an A/T item so implementers verify this edge case.

@lonexreb
Copy link
Copy Markdown
Contributor Author

lonexreb commented May 8, 2026

Round-1 fixes for oz-for-oss review: (1) resolved pinch/trackpad zoom — IS in V1, follows same per-window scoping as keyboard shortcuts; non-goal wording removed; A_pinch_per_window_scope and T_pinch_zoom_per_window added; (2) 'Apply to all open windows' button is REQUIRED in V1 — enabled only when ≥1 open window differs from global default; greyed out with tooltip otherwise; A_apply_to_all_button_resets_all_open added; (3) tab-move tests added — moved tab adopts destination window zoom (T_tab_move_adopts_dest_zoom); drag-out to new window uses global default, not source-window zoom (T_tab_move_to_new_window_uses_global_default).

@lonexreb
Copy link
Copy Markdown
Contributor Author

lonexreb commented May 8, 2026

/oz-review

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 8, 2026

@lonexreb

I'm re-reviewing this spec-only pull request in response to a review request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This spec defines in-memory per-window zoom with focused-window-scoped actions, default inheritance for new windows, settings label/UI changes, acceptance criteria, and tests. The supplemental security pass did not identify a new trust boundary or sensitive data handling concern.

Concerns

  • The Settings/API surface says appearance.zoom_level semantics are unchanged, but the behavior contract changes it from a live global zoom value to a default for new windows. Resolve this contradiction before implementation.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread specs/GH10115/SPEC.md Outdated

## Settings / API surface

- `appearance.zoom_level` (existing): unchanged in schema, semantics, and storage. Now documented as "default for new windows". User-facing label updated to match.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This says the setting semantics are unchanged, but B5/B6 redefine it as a default for future windows rather than a live global override; update this line so implementers do not preserve the current global behavior.

Suggested change
- `appearance.zoom_level` (existing): unchanged in schema, semantics, and storage. Now documented as "default for new windows". User-facing label updated to match.
- `appearance.zoom_level` (existing): schema and storage unchanged. Runtime semantics change from the live global zoom value to the default used when creating new windows. User-facing label updated to match.

@lonexreb
Copy link
Copy Markdown
Contributor Author

lonexreb commented May 8, 2026

Addressed the 1 important concern from the latest oz-for-oss review:

appearance.zoom_level semantics contradiction (Settings/API surface): Replaced the contradictory "semantics are unchanged" wording with an explicit before/after table showing schema/storage/range are unchanged but runtime semantics shift: appearance.zoom_level is now read once at window-creation time to seed each window's per-window zoom_level: f32, never re-read on subsequent paints, and never written by Cmd +/-/0 action handlers. Added concrete consequences (toggling Settings doesn't change open windows; Cmd + doesn't write back; "Apply to all open windows" writes the global default into each per-window field without modifying appearance.zoom_level itself). The earlier wording is explicitly superseded.

Commits: a6e482a (fix), de633e4 (merge)

@lonexreb
Copy link
Copy Markdown
Contributor Author

lonexreb commented May 8, 2026

/oz-review

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 8, 2026

@lonexreb

I'm re-reviewing this spec-only pull request in response to a review request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This spec defines per-window zoom state for keyboard, menu/palette, and pinch inputs while preserving appearance.zoom_level as the default for new windows. It covers settings semantics, tab/split behavior, tab moves between windows, acceptance criteria, tests, open questions, and telemetry.

Concerns

  • No blocking concerns found. The spec is clear about in-memory V1 behavior, global-default semantics, focused-window scoping, and the required resync control.
  • Security review found no material security concerns for this local UI/window-state feature.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@Eridanus117
Copy link
Copy Markdown

Thanks a lot for putting this spec together and iterating on the review feedback.

I should have started this contribution with a spec first, and I really appreciate you helping fill that gap here. This feature is still a very strong need for my workflow: having zoom scoped per window would make Warp much easier to use across multiple windows / displays.

I also noticed that app/src/workspace/view_test.rs has been getting frequent conflicts with master. I’m completely fine with maintainers directly editing my implementation PR if that helps resolve conflicts, adjust the tests, or move this forward faster.

I hope this can land soon once the remaining spec review is resolved. For any future contributions from my side, I’ll make sure to start with a spec before implementation.

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

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants