Skip to content

fix(components): skip nested instances in reuse suggestions - #676

Open
mmaazrana wants to merge 1 commit into
doop-design:mainfrom
mmaazrana:fix/614-skip-nested-component-reuse
Open

mmaazrana wants to merge 1 commit into
doop-design:mainfrom
mmaazrana:fix/614-skip-nested-component-reuse

Conversation

@mmaazrana

@mmaazrana mmaazrana commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #614.

Creating or updating a component could ask the agent to turn existing nested instances into components again. A list item containing one instance could also trigger a suggestion because the scanner counted the instance toward its two-element minimum.

The repeat scan now treats each component reference as a single boundary. Its identity remains part of the enclosing shape, and only hand-written elements count toward a reuse suggestion. This works with both short-form <doop-use> references and expanded instances.

The regression test creates a rail with three slotted badges, panels that contain different components, and three hand-written navigation rows. Only the navigation rows should produce a reuse suggestion.

Verification

  • 109 tests passed across the reuse-note and component suites.
  • Typecheck, lint, formatting, documentation checks, and the production build passed.
  • Full suite on macOS: 4,479 passed, 25 skipped, and three server-listener tests timed out. The same three tests time out on unchanged main (685b4aaa) on this machine when they connect to 127.0.0.2.

Prove it works
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@greptile-apps

greptile-apps Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

The PR stops reuse suggestions from counting existing component instances as hand-written markup.

  • Nested component references stay out of hand-written reuse counts.

Reviews (1) · Last reviewed commit: "fix(components): skip nested instances i..." · Reviewed by Greptile

This branch has not been deployed

No deployments
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.

fix(components): REUSE note counts nested <doop-use> instances as hand-drawn repeats

1 participant