You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: improve argument parsing for common user mistakes
Address 5 ResolutionError patterns from production Sentry issues:
- CLI-BG: Detect swapped view args (ID first, target second) and
auto-correct with warning
- CLI-BB: Parse multi-slash args like org/project/issueId correctly
- CLI-BA: Normalize underscores to hyphens in project/org slugs
- CLI-B9: Auto-redirect to org-all when bare slug matches an org name
- CLI-B8: Detect issue short IDs in event/log/trace view and suggest
the correct command
Technical changes:
- Add detectSwappedViewArgs(), looksLikeIssueShortId(), normalizeSlug()
helpers to arg-parsing.ts
- Add parseMultiSlashIssueArg() for org/project/id patterns
- Change findProjectsBySlug() to return { projects, orgs } (was bare
array) to enable org-slug matching without extra API calls
- Add orgAllFallback option to handleProjectSearch for auto-redirect
- Remove stderr parameter from resolveProjectBySlug and related
functions — use Consola logger instead
- Update all view commands (event, log, trace) with swap detection
and issue-short-ID suggestions
All 2726 unit tests pass. Typecheck and lint clean.
0 commit comments