Skip to content

feat(commands): add buildRouteMap wrapper with standard subcommand aliases#690

Merged
BYK merged 3 commits intomainfrom
feat/ls-alias-for-list-commands
Apr 8, 2026
Merged

feat(commands): add buildRouteMap wrapper with standard subcommand aliases#690
BYK merged 3 commits intomainfrom
feat/ls-alias-for-list-commands

Conversation

@BYK
Copy link
Copy Markdown
Member

@BYK BYK commented Apr 8, 2026

Summary

  • Introduce src/lib/route-map.ts as the single entry point for building Stricli route maps — analogous to how src/lib/command.ts wraps buildCommand
  • Auto-inject standard aliases based on which route keys exist: listls, viewshow, deleteremove/rm, createnew
  • Migrate all 16 command group index.ts files and app.ts to import from the wrapper instead of @stricli/core directly
  • Update getSubcommandsForRoute() in list-command.ts to collect subcommand aliases so plural+alias combos like sentry issues ls are properly intercepted

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (commands) Add buildRouteMap wrapper with standard subcommand aliases by BYK in #690

Bug Fixes 🐛

  • (init,feedback) Default to tracing only in feature select and attach user email to feedback by MathurAditya724 in #688

Internal Changes 🔧

  • (eval) Replace OpenAI with Anthropic SDK in init-eval judge by betegon in #683
  • (init) Use markdown pipeline for spinner messages by betegon in #686
  • Regenerate skill files and command docs by github-actions[bot] in 584ec0e0

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/pr-preview/pr-690/

Built to branch gh-pages at 2026-04-08 18:42 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Codecov Results 📊

134 passed | Total: 134 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 1488 uncovered lines.
❌ Project coverage is 95.43%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    95.44%    95.43%    -0.01%
==========================================
  Files          223       224        +1
  Lines        32511     32538       +27
  Branches         0         0         —
==========================================
+ Hits         31027     31050       +23
- Misses        1484      1488        +4
- Partials         0         0         —

Generated by Codecov Action

@BYK BYK force-pushed the feat/ls-alias-for-list-commands branch from f944e25 to a17e0ef Compare April 8, 2026 16:00
@BYK BYK changed the title feat(commands): add ls as alias for list across all route groups feat(commands): add buildRouteMap wrapper with standard subcommand aliases Apr 8, 2026
…iases

Introduce `src/lib/route-map.ts` as the single entry point for building
route maps — analogous to how `src/lib/command.ts` wraps Stricli's
`buildCommand`. The wrapper auto-injects standard aliases based on which
route keys exist:

  list   → ls
  view   → show
  delete → remove, rm
  create → new

All 16 command group index.ts files and app.ts now import from the
wrapper instead of @stricli/core directly. Manual aliases that are
covered by the standard set have been removed.

Also update `getSubcommandsForRoute()` in list-command.ts to collect
subcommand aliases so plural+alias combos like `sentry issues ls` are
properly intercepted.
@BYK BYK force-pushed the feat/ls-alias-for-list-commands branch from 67c9b17 to d4fb1cd Compare April 8, 2026 17:36
@BYK BYK marked this pull request as ready for review April 8, 2026 18:17
@BYK BYK force-pushed the feat/ls-alias-for-list-commands branch from 8b8d1fb to 7c55b2f Compare April 8, 2026 18:30
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7c55b2f. Configure here.

Stricli always provides aliases at runtime (empty array when none),
but type it as optional and use ?? [] for defensive safety per
Seer and BugBot review feedback.
@BYK BYK force-pushed the feat/ls-alias-for-list-commands branch from 7c55b2f to a9c4c37 Compare April 8, 2026 18:41
@BYK BYK merged commit 8c49fb2 into main Apr 8, 2026
27 checks passed
@BYK BYK deleted the feat/ls-alias-for-list-commands branch April 8, 2026 19:05
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