Skip to content

spec: open review panel maximised by default (#10036)#10223

Open
lonexreb wants to merge 5 commits intowarpdotdev:masterfrom
lonexreb:spec/10036-maximize-review-panel
Open

spec: open review panel maximised by default (#10036)#10223
lonexreb wants to merge 5 commits intowarpdotdev:masterfrom
lonexreb:spec/10036-maximize-review-panel

Conversation

@lonexreb
Copy link
Copy Markdown
Contributor

@lonexreb lonexreb commented May 6, 2026

Spec for #10036. New code.editor.review_panel.open_maximized boolean setting (default false). When enabled, clicking the code-review button opens the panel pre-maximised in one click. Default-off preserves today's behavior exactly.

Closes (spec-only) #10036.

@cla-bot cla-bot Bot added the cla-signed label May 6, 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 6, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 6, 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 default-off setting to open the code-review panel maximised in one click while preserving the current default behavior. The behavior and acceptance criteria are mostly clear, and the security review found no material high-level security concerns for this UI preference.

Concerns

  • The setting key is specified as editor.review_panel_open_maximized, but the referenced code-review/editor settings in this repository use the code.editor.* TOML namespace. The spec should name the final TOML path consistently before implementation.
  • The test plan omits coverage for the runtime-toggle behavior required by A3.

Verdict

Found: 0 critical, 1 important, 1 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/GH10036/SPEC.md Outdated

## Behavior contract

- B1. New setting `editor.review_panel_open_maximized: bool`,
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] The setting key conflicts with the repository's existing code-review/editor TOML namespace (code.editor.show_code_review_button, code.editor.show_code_review_diff_stats, code.editor.auto_open_code_review_pane_on_first_agent_change). Specify code.editor.review_panel_open_maximized consistently, or explicitly justify the new top-level editor.* namespace, so implementation and TOML round-trip behavior are unambiguous.

Comment thread specs/GH10036/SPEC.md Outdated

## Test plan

- T1. Setting round-trips through TOML.
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] Add a test for A3 so toggling the setting while a non-maximised panel is already open is verified not to mutate the current panel state.

@lonexreb
Copy link
Copy Markdown
Contributor Author

lonexreb commented May 8, 2026

Round-1 fixes for oz-for-oss review: (1) renamed setting key to code.editor.review_panel.open_maximized to match the existing code.editor.* TOML namespace; (2) added runtime-toggle test covering the A3 acceptance criterion.

@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 a default-off setting for opening the code review panel maximised and covers the core behavior, acceptance criteria, and runtime toggle expectations.

Concerns

  • The public TOML setting key is inconsistent between the PR description and the spec/test plan, so implementation could ship an incompatible config key unless the spec chooses one canonical name.

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/GH10036/SPEC.md

## Goal

Add a boolean setting `code.editor.review_panel.open_maximized`
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] The PR description names this setting editor.review_panel_open_maximized, but the spec and tests require code.editor.review_panel.open_maximized; pick one canonical public TOML key here so implementation and compatibility tests do not diverge.

@lonexreb
Copy link
Copy Markdown
Contributor Author

lonexreb commented May 8, 2026

Round-2 fix: audited every mention of the setting key across Behavior, Settings, Acceptance, Tests, Implementation Pointers, and Open Questions; renamed any stragglers to the single canonical key code.editor.review_panel.open_maximized. Added explicit 'Canonical setting key' callout at top of Settings section to prevent future drift.

@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 a default-off setting to open the code review panel maximized and covers the intended behavior, settings exposure, implementation sketch, and tests.

Concerns

  • The settings UI path in the spec does not match the current Code settings layout, so implementation could put the toggle in the wrong place.
  • The OFF/default acceptance criteria conflict with the existing maximize/restore state machine language; the spec should define behavior when the panel was previously maximized before being closed.
  • The implementation sketch points to a non-existent review_panel anchor in app/src/settings/code.rs, while related code-review settings are currently split across other settings groups.
  • The PR description uses editor.review_panel_open_maximized, which conflicts with the spec's canonical code.editor.review_panel.open_maximized; update the PR text to avoid propagating the wrong key.

Verdict

Found: 0 critical, 2 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/GH10036/SPEC.md Outdated
affordance still works to shrink it.
- B3. When `false`, no behavior change — the existing two-click
flow is preserved exactly.
- B4. Setting is exposed in **Settings → Editor → Code review**
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 settings path does not match the current settings layout (CodeEditor and Code Review); specify whether to use the existing Code subpage or intentionally create a new Editor page.

Comment thread specs/GH10036/SPEC.md Outdated
Comment on lines +59 to +60
- A1. With setting OFF (default): clicking code-review opens
side-panel; second click maximises. (Pixel-equivalent to today.)
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] A1 says the OFF/default path always opens a side panel, but B5 says to respect the existing maximize/restore state machine; clarify whether a previously maximized-but-closed panel should reopen maximized or be forced restored when this setting is false.

Comment thread specs/GH10036/SPEC.md Outdated

## Implementation sketch

- Add the setting in `app/src/settings/code.rs` near the other
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] app/src/settings/code.rs has no review_panel settings today; update this sketch to point at the actual related settings anchors or explicitly require adding this one to CodeSettings despite the current split.

@lonexreb
Copy link
Copy Markdown
Contributor Author

lonexreb commented May 8, 2026

Addressed all 2 important + 2 suggestion concerns from latest oz-for-oss review:

Settings UI path corrected (important #1)
The spec previously claimed 'Settings → Editor → Code review' — that path does NOT exist. Verified against app/src/settings_view/code_page.rs: the actual category is Category::new("Code Editor and Review", code_editor_review_widgets) at lines 314 and 438. B4 now states the toggle is appended to code_editor_review_widgets adjacent to show_code_review_button, show_code_review_diff_stats, and auto_open_code_review_pane_on_first_agent_change. Both cfg(...) branches must be updated.

Implementation sketch grounded in real code (important #2)
Removed the bogus 'review_panel anchor in code.rs' reference (no such anchor exists — sibling settings are show_project_explorer, show_global_search, etc.). New sketch shows the exact define_settings_group! field shape, points at setup_code_review_panel (line 8001) and open_code_review_panel_from_arg (line 8055) as the runtime entry points, and explains that we seed PaneGroup::is_right_panel_maximized rather than introducing a new action variant.

Maximize/restore state-machine conflict resolved (suggestion)
B5 now has 4 sub-rules + concrete acceptance criteria A4 and A5 covering the 'previously maximised before being closed' case the bot called out:

  • Tab restore (RightPanelSnapshot) overrides the setting — the saved per-tab state is authoritative.
  • Close-then-reopen within a session uses the setting (because the cross-close persistence is only RightPanelSnapshot, which only fires on tab restore).
  • Runtime toggle never retroactively maximises an already-open panel.
  • New tests T5 and T6 enforce these rules.

PR description (suggestion) — note for maintainer
Spec is now the source of truth and forbids any variant other than code.editor.review_panel.open_maximized (with grep test T8). The PR body still uses the older editor.review_panel_open_maximized spelling and should be updated by a maintainer with edit permission on the PR description; my role here is limited to the spec file and review comments.

- Correct settings location: GeneralSettings in terminal/general_settings.rs (verified against codebase)
- Reconcile B5 with maximize/restore state machine: setting governs fresh opens; snapshot wins on restore; close-then-reopen is fresh open
- Codify OFF + previously-maximised-then-closed behavior in A1
- Mandate PR-description grep for non-canonical key spellings before merge
@lonexreb
Copy link
Copy Markdown
Contributor Author

lonexreb commented May 8, 2026

Addressed the latest oz-for-oss review:

  • Settings UI path: Corrected to GeneralSettings in app/src/terminal/general_settings.rs (line 159 — appended after auto_open_code_review_pane_on_first_agent_change). Verified that code-review settings are split across TabSettings (per-tab) and GeneralSettings (global), and the new global flag belongs with the latter. Removed references to the non-existent define_settings_group!(CodeSettings, ...) block.
  • State-machine conflict: Reconciled the OFF default with the existing is_right_panel_maximized / RightPanelSnapshot state machine. The setting + snapshot are orthogonal: snapshot always wins on tab/session restore, the setting always wins on fresh opens. Close-then-reopen is treated as a fresh open (no RightPanelSnapshot is created on close). A1 now spells out the previously-maximised-then-closed case.
  • PR description key drift: Edited the PR description to use the canonical code.editor.review_panel.open_maximized (was editor.review_panel_open_maximized). Spec now mandates a grep of PR descriptions/commits for non-canonical variants.

@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 a new default-off setting for opening the code review panel maximised and covers the user-facing setting, state-machine interaction, and tests. The overall scope is appropriate, and the security pass did not identify a material security surface.

Concerns

  • The default-off behavior contract conflicts with the current right-panel state machine for close-then-reopen after a maximised panel.
  • The implementation sketch omits the actual code-review button/toggle path and points implementers at entry points that do not own the shared open/maximise state transition.
  • The rejected-key grep requirement is self-contradictory unless it excludes spec prose or scopes itself to implementation artifacts.

Verdict

Found: 1 critical, 2 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/GH10036/SPEC.md
`workspace:toggle_maximize_code_review_panel` action) maximises
it. Pixel-equivalent to today.

**OFF + previously maximised then closed (no tab restore in
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.

🚨 [CRITICAL] This conflicts with the default-off promise and the current state machine: closing the right panel does not clear is_right_panel_maximized, so a maximised panel can reopen maximised today. Either preserve that behavior when the setting is OFF or explicitly scope this as an intentional behavior change with tests.

Comment thread specs/GH10036/SPEC.md
the `Category::new("Code Editor and Review", ...)` grouping (lines
314, 438). Do NOT introduce a new category or settings page.

- The runtime entry points are `setup_code_review_panel` (line
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 omits the code-review button path: ToggleCodeReviewPane flows through toggle_right_panel / update_right_panel_open_state, while setup_code_review_panel only populates panel content. Specify the shared state-update location so the primary click path actually seeds the maximised default.

Comment thread specs/GH10036/SPEC.md
`app/src/settings_view/code_page.rs` (lines 297/301 and 421/425),
inside the `Category::new("Code Editor and Review", ...)` group
— not in any new category.
- T8. Grep test: no occurrence of `editor.review_panel_open_maximized`,
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 grep test is self-contradictory because the spec itself contains the rejected variants above. Scope the check to implementation artifacts or explicitly exclude spec prose so the spec's own diff does not fail its acceptance test.

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.

1 participant