Skip to content

test: add @feature:line-numbers tag for plugins that hide line numbers#7658

Merged
JohnMcLear merged 1 commit intodevelopfrom
test/tag-line-numbers
May 2, 2026
Merged

test: add @feature:line-numbers tag for plugins that hide line numbers#7658
JohnMcLear merged 1 commit intodevelopfrom
test/tag-line-numbers

Conversation

@JohnMcLear
Copy link
Copy Markdown
Member

Surfaced by ep_hide_line_numbers' red main on the disables-aware test runner.

Two pad_settings specs use expect(...).not.toHaveClass(/line-numbers-hidden/) to verify the line-number gutter is visible by default before settings flip it on. Plugins that hide line numbers (ep_hide_line_numbers calls pad.changeViewOption('showLineNumbers', false) in postAceInit) keep that class on the body for the entire pad lifetime, so those negative assertions can never hold.

Change

Adds @feature:line-numbers tag to:

  • pad_settings.spec.ts:31pad settings act as defaults until enforcement is enabled
  • pad_settings.spec.ts:125uses My View defaults for newly created pads without changing an existing pad default

ep_hide_line_numbers will declare "disables": ["@feature:line-numbers"] in ep.json so these are excluded from pass-1 regression and counted in pass-2 honesty.

Note: ep_hide_line_numbers also fails on rtl_url_param.spec.ts:11/16 for an apparently unrelated reason (the RTL checkbox stays unchecked when both ?rtl=true and the plugin's changeViewOption are in flight). That's a real plugin/core interaction bug, not a feature exclusion — handled separately.

Companion to existing tags (@feature:chat, @feature:username, @feature:clear-authorship, @feature:error-gritter, @feature:authorship-bg-color). See doc/PLUGIN_FEATURE_DISABLES.md.

🤖 Generated with Claude Code

…line-numbers

Surfaced by ep_hide_line_numbers' red main. Two pad_settings specs
use `expect(...).not.toHaveClass(/line-numbers-hidden/)` to verify
the line-number gutter is visible by default before settings flip
it on, but plugins that hide line numbers (ep_hide_line_numbers
sets `pad.changeViewOption('showLineNumbers', false)` in postAceInit)
keep that class on the body for the entire pad lifetime.

Tag the two affected specs with @feature:line-numbers so plugins
that hide line numbers can declare `disables: ["@feature:line-numbers"]`
in ep.json and have these excluded from pass-1 regression while
still failing pass-2 honesty (plugin must actually keep them hidden).

Companion to the existing tag set (@feature:chat, @feature:username,
@feature:clear-authorship, @feature:error-gritter,
@feature:authorship-bg-color). See doc/PLUGIN_FEATURE_DISABLES.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@qodo-code-review
Copy link
Copy Markdown

ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one.

@qodo-free-for-open-source-projects
Copy link
Copy Markdown

Review Summary by Qodo

Tag line-numbers-related pad_settings specs with feature flag

🧪 Tests

Grey Divider

Walkthroughs

Description
• Tags two pad_settings specs with @feature:line-numbers
• Allows plugins hiding line numbers to declare feature disables
• Excludes affected tests from pass-1 regression testing
• Enables pass-2 honesty verification for plugin behavior
Diagram
flowchart LR
  A["pad_settings specs"] -- "add @feature:line-numbers tag" --> B["Feature-aware test runner"]
  B -- "plugins declare disables" --> C["Excluded from pass-1 regression"]
  B -- "plugins declare disables" --> D["Included in pass-2 honesty"]
Loading

Grey Divider

File Changes

1. src/tests/frontend-new/specs/pad_settings.spec.ts 🧪 Tests +6/-2

Add @feature:line-numbers tags to two specs

• Added @feature:line-numbers tag to test at line 31 (pad settings defaults behavior)
• Added @feature:line-numbers tag to test at line 125 (My View defaults for new pads)
• Tags enable plugins like ep_hide_line_numbers to declare feature disables in ep.json
• Allows these tests to be excluded from pass-1 regression while included in pass-2 honesty

src/tests/frontend-new/specs/pad_settings.spec.ts


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects
Copy link
Copy Markdown

qodo-free-for-open-source-projects Bot commented May 2, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

@JohnMcLear JohnMcLear merged commit 6e3f929 into develop May 2, 2026
42 checks passed
@JohnMcLear JohnMcLear deleted the test/tag-line-numbers branch May 2, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant