Skip to content

Move Code editor line numbers setting to Editor and Code Review page - #15458

Draft
warp-agent-staging[bot] wants to merge 3 commits into
masterfrom
factory/move-line-numbers-setting
Draft

Move Code editor line numbers setting to Editor and Code Review page#15458
warp-agent-staging[bot] wants to merge 3 commits into
masterfrom
factory/move-line-numbers-setting

Conversation

@warp-agent-staging

@warp-agent-staging warp-agent-staging Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Description

Moves the "Code editor line numbers" dropdown setting from the Features page's "Text Editing" category to the "Editor and Code Review" sub-page (under the Code umbrella), per a Slack request from acarl005.

The setting itself is unchanged (Absolute/Relative dropdown backed by AppEditorSettings::code_editor_line_number_mode). The dropdown's ViewHandle, its action variant (SetCodeEditorLineNumberMode), the model subscription that refreshes the dropdown's items/selection, and its telemetry event were all carried over from FeaturesPageView to EditorAndCodeReviewPageView.

The Editor and Code Review page only renders when FeatureFlag::FullSourceCodeEmbedding or FeatureFlag::OpenWarpNewSettingsModes is enabled, and neither is in RELEASE_FLAGS, so a straight move would have made the setting vanish outright on stable builds. To avoid that regression, the Features page keeps its own copy of the widget, gated to render only when the Editor and Code Review page would not be shown (!(FullSourceCodeEmbedding.is_enabled() || OpenWarpNewSettingsModes.is_enabled())) — mirroring the existing AutoOpenCodeReviewPaneWidget dual-registration pattern already used on this page. The setting is reachable in exactly one place in either configuration, never both, never neither.

Both copies' search_terms are identical and now include both "number" and "numbers" so the setting's own label ("Code editor line numbers") matches settings search.

Linked Issue

No tracked issue exists for this change; it originated directly from a Slack request.

Testing

No automated test was added — this is a UI relocation of an existing setting with no behavior change, and the repo's settings-page filter/search behavior already has coverage for the shared PageType machinery this widget reuses.

  • ./script/format and cargo clippy -p warp --all-targets --tests -- -D warnings both pass.
  • cargo build --bin warp compiles cleanly.
  • Manually verified both configurations with the computer-use tool, using a second build with FullSourceCodeEmbedding and OpenWarpNewSettingsModes force-disabled to simulate the stable/flags-off path:
    • Flags on (default build): the setting appears only on Code > Editor and Code Review (as the last item, below "Auto save"); it is absent from the Features page entirely; searching "line numbers" returns exactly 1 result ("Editor and Code Review" under "Code") and navigates to the setting; the dropdown offers Absolute/Relative, changing it updates immediately, and the value persists after navigating away and back.
    • Flags off: the "Code" section/"Editor and Code Review" page does not appear in the sidebar at all; the setting appears only on the Features page's Text Editing section (between "Autocomplete quotes, parentheses, and brackets" and "Edit code and commands with Vim keybindings"); searching "line numbers" returns exactly 1 result ("Features") and navigates to the setting; the dropdown works and persists there too.

Screenshots / Videos

Computer-use video recordings

Recording navigation to Settings > Code > Editor and Code Review, opening the "Code editor line numbers:" dropdown, selecting a different option, and verifying the change.
Testing Code editor line numbers dropdown persistence: Recording navigation to Settings > Code > Editor and Code Review, opening the "Code editor line numbers:" dropdown, selecting a different option, and verifying the change.

Computer-use screenshots (8)

Features settings page showing the "Text Editing" section (between "Keys" and "Terminal Input") containing only "Autocomplete quotes, parentheses, and brackets" and "Edit code and commands with Vim keybindings" toggles — no "Code editor line numbers:" dropdown is present.
Features settings page (flags-on default build) — the setting is absent here.

Editor and Code Review settings page (under Code section) showing "Code editor line numbers:" dropdown set to "Absolute", positioned directly below "Auto save" setting.
Editor and Code Review settings page (flags-on default build) showing the setting in its new home.

The "Code editor line numbers:" dropdown opened on the Editor and Code Review page, showing two options: "Absolute" (currently selected, highlighted) and "Relative".
Dropdown options on the Editor and Code Review page (flags-on default build).

Settings sidebar showing full navigation list with no "Code" section/umbrella present anywhere.
Settings sidebar with both flags force-disabled: no "Code" section/umbrella present anywhere.

Features page, Text Editing section showing "Code editor line numbers:" dropdown, located right below "Autocomplete quotes, parentheses, and brackets" toggle and right above "Edit code and commands with Vim keybindings" toggle.
Features page (flags off) showing "Code editor line numbers:" restored in its fallback location.

Features page, Text Editing section: "Code editor line numbers:" dropdown after selecting "Absolute" from the dropdown.
Features page (flags off), confirming the dropdown selection updates immediately.

Binary 1 (flags-on) settings search for "gutter" showing one result under Code > Editor and Code Review.
Flags-on build: settings search surfaces exactly one result, under Code > Editor and Code Review.

Binary 2 (flags-off) settings search for "gutter" showing one result under Features.
Flags-off build: settings search surfaces exactly one result, under Features.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

The dropdown was previously on the Features page's Text Editing
category. Move it to the Editor and Code Review sub-page alongside the
other built-in code editor settings, carrying over its dropdown state,
action variant, and telemetry.
@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

This PR was generated with Warp.

Comment @warp-factory on this PR to send it follow-up work.

View run View conversation View on Slack

The Editor and Code Review page only renders when FullSourceCodeEmbedding
or OpenWarpNewSettingsModes is enabled; neither is in RELEASE_FLAGS, so on
stable builds the setting was vanishing outright. Restore it on the
Features page, gated to appear only when the destination page would not
render, so it's reachable in exactly one place in either configuration.
The widget's search_terms only had the singular "number", so the
setting's own label ("line numbers") never matched. Add "numbers" to
both copies of search_terms (Features and Editor and Code Review),
keeping them identical.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants