Skip to content

📝 docs(spa-routes): document .desktop.{ts,tsx} variant pattern#15327

Merged
Innei merged 1 commit into
canaryfrom
docs/spa-routes-desktop-variants
May 29, 2026
Merged

📝 docs(spa-routes): document .desktop.{ts,tsx} variant pattern#15327
Innei merged 1 commit into
canaryfrom
docs/spa-routes-desktop-variants

Conversation

@Innei

@Innei Innei commented May 29, 2026

Copy link
Copy Markdown
Member

💻 Change Type

  • 📝 docs

🔗 Related Issue

None — internal agent-skill documentation only.

🔀 Description of Change

Extend the spa-routes skill so coding agents catch all colocated .desktop.{ts,tsx} variants under src/routes/, not just the desktopRouter.config.tsx / desktopRouter.config.desktop.tsx pair.

Concretely:

  • Add a new section 3b. Other .desktop.{ts,tsx} variants inside src/routes/ listing the variant pattern: Vite's resolver swaps a <name>.desktop.{ts,tsx} for its base <name>.{ts,tsx} in Electron builds, so editing only one side silently breaks Electron.
  • Document the known cases today:
    • src/routes/(main)/settings/features/componentMap.ts × componentMap.desktop.ts (guarded by componentMap.sync.test.ts)
    • src/routes/(main)/agent/index.tsx × index.desktop.tsx
    • src/routes/(main)/group/index.tsx × index.desktop.tsx
  • Spell out 4 rules: glob siblings before editing, register new SettingsTabs in both componentMaps, prefer platform-aware code over introducing new variants, and delete pairs together.
  • Update the skill description so triggers also cover componentMap.desktop, index.desktop.tsx, and .desktop.tsx variant — keeping the skill from missing relevant edits.

🧪 How to Test

Skill content only; no runtime impact.

  • Tested locally
  • Added/updated tests
  • No tests needed

📸 Screenshots / Videos

N/A — markdown-only change.

📝 Additional Information

No code, build, or behavior change. This only updates .agents/skills/spa-routes/SKILL.md so future agent runs that touch src/routes/ are reminded to check for and sync .desktop.{ts,tsx} siblings.

Extend the spa-routes skill so agents catch all `.desktop` colocated
variants under `src/routes/`, not just the desktopRouter pair. Adds a
new "3b. Other .desktop variants" section listing the current known
cases (settings componentMap, agent index, group index), spells out
the drift risk for each, and lists the rules for editing/adding/
removing variant pairs. Also updates the skill description so the
trigger glob covers `componentMap.desktop`, `index.desktop.tsx`, and
`.desktop.tsx variant`.
@vercel

vercel Bot commented May 29, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
lobehub Building Building Preview, Comment May 29, 2026 9:49am

Request Review

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label May 29, 2026

@sourcery-ai sourcery-ai Bot left a comment

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.

We've reviewed this pull request using the Sourcery rules engine

@Innei Innei merged commit 1736faf into canary May 29, 2026
27 of 28 checks passed
@Innei Innei deleted the docs/spa-routes-desktop-variants branch May 29, 2026 09:50
PrakrutR added a commit to PrakrutR/genhub-v2 that referenced this pull request May 30, 2026
Merges upstream/canary into main, resolving all conflicts in favor of
upstream. Key changes pulled in from upstream include:

- feat(page-share): document share flow with business slot stubs (lobehub#15309)
- feat(device): connectionId + channel routing in gateway client & device list (lobehub#15322)
- fix(desktop): upload .blockmap files to S3 for differential updates (lobehub#15326)
- docs(spa-routes): document .desktop.{ts,tsx} variant pattern (lobehub#15327)
- chore: update @lobehub/ui to v5.15.5 (lobehub#15325)
- New builtin-tool skill and data-fetching-architecture skill added
- Various skill/agent doc updates (i18n, linear, local-testing, store-data-structures, etc.)
- Database model and repository updates (topic, userMemory models, bm25, search index)
- Google createImage provider updates
- Navigation layout hook updates
- GitHub Actions workflow restored (issue-auto-comments.yml)

All merge conflicts resolved by accepting upstream versions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Coooolfan pushed a commit to Coooolfan/lobehub that referenced this pull request Jun 1, 2026
…ub#15327)

Extend the spa-routes skill so agents catch all `.desktop` colocated
variants under `src/routes/`, not just the desktopRouter pair. Adds a
new "3b. Other .desktop variants" section listing the current known
cases (settings componentMap, agent index, group index), spells out
the drift risk for each, and lists the rules for editing/adding/
removing variant pairs. Also updates the skill description so the
trigger glob covers `componentMap.desktop`, `index.desktop.tsx`, and
`.desktop.tsx variant`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant