Skip to content

refactor(TemplateMenu): move items to script setup - #345

Merged
benjamincanac merged 1 commit into
mainfrom
refactor/template-menu-items
Oct 5, 2026
Merged

benjamincanac merged 1 commit into
mainfrom
refactor/template-menu-items

Conversation

@benjamincanac

@benjamincanac benjamincanac commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Moves the TemplateMenu items out of the template into a typed items const in <script setup>, same as the UserMenu in the dashboard and chat templates.

The inline version also breaks vue-tsc@3.3.12 in starter-vue, where the // of the URLs ends up as a comment in the generated code (vuejs/language-tools#6240).

Summary by CodeRabbit

  • Refactor
    • No user-facing changes. The template menu’s available options, labels, links, and Docs checkbox settings remain the same. The update changes only how these options are organized internally, so the menu continues to behave as before.

@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs-template Ready Ready Preview Oct 5, 2026 11:58am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6f568e9e-85c9-411f-9968-243f76004088
📥 Commits

Reviewing files that changed from the base of the PR and between 0f3e57a and 5e75d1a.

📒 Files selected for processing (1)
  • app/components/TemplateMenu.vue

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The template dropdown now uses a typed constant for its ten existing entries. Their labels, URLs, and Docs checkbox settings remain unchanged.

Changes

Template menu

Layer / File(s) Summary
Define and bind template items
app/components/TemplateMenu.vue
The ten dropdown entries move into a DropdownMenuItem[] constant. The dropdown’s :items binding now references that constant.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 5e75d

This menu refactor has no identified behavior or release risk; normal checks should be sufficient before merging.

Architecture Summary

Architecture risk: 🔵 Low · up to 5e75d

The change affects 1 system.

Changed systems: app

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — app (ui) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in app/components/TemplateMenu.vue: Adds a DropdownMenuItem[] constant containing the ten existing template entries, including the Docs item’s primary color, checked state, and checkbox type; removes the inline array from the dropdown.
  • observed — Modified behavior in app/components/TemplateMenu.vue: The dropdown’s :items binding now references the extracted items constant instead of defining the list inline.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: moving the template items into a script setup constant.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@benjamincanac
benjamincanac merged commit c153042 into main Oct 5, 2026
4 checks passed
@benjamincanac
benjamincanac deleted the refactor/template-menu-items branch October 5, 2026 12:02

This branch was successfully deployed

1 active deployment
Preview — 5e75d1ad Deployed Oct 5, 2026 by vercel[bot]
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