Skip to content

feat: add Sprints keyboard shortcut (gt) - #99

Merged
imshashank merged 8 commits into
Noveum:mainfrom
SinghAstra:feat/add-cycles-shortcut
Aug 7, 2026
Merged

feat: add Sprints keyboard shortcut (gt)#99
imshashank merged 8 commits into
Noveum:mainfrom
SinghAstra:feat/add-cycles-shortcut

Conversation

@SinghAstra

@SinghAstra SinghAstra commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #98

What Changed

Added the missing workspace keyboard navigation shortcut for Sprints to maintain consistency with the rest of the sidebar navigation.

As noted in the issue, I used g t instead of the initially intuitive g c to prevent a direct collision with the global c (Create issue) single-key shortcut, which was intercepting the chord.

Verification

  • Added binding: 'g t' to both buildNavigation and buildSidebarNav in apps/web/src/lib/navigation.ts.
  • Added a unit test in apps/web/tests/components/command-palette.test.tsx verifying the gt route.
  • Verified the tooltip displays g t on hover in the UI.
Screenshot 2026-08-06 112856

Greptile Summary

Adds the missing g t workspace shortcut for navigating to Sprints.

  • Propagates the shortcut through the shared Sprints navigation definition.
  • Adds an integration test confirming that g t routes to Sprints while a standalone t still invokes its competing surface action.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/web/src/lib/navigation.ts Adds the Sprints shortcut to the shared workspace navigation entry, allowing both navigation builders and command registration to consume it.
apps/web/tests/components/command-palette.test.tsx Verifies Sprints command routing and confirms that the two-key sequence takes precedence over a competing standalone t binding.

Reviews (6): Last reviewed commit: "test: prove standalone t binding is acti..." | Re-trigger Greptile

@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

@SinghAstra is attempting to deploy a commit to the MagicAPI Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Sprints navigation link now supports the g t shortcut. Command-palette tests cover command selection, shortcut navigation, and competing hotkey behavior.

Changes

Sprints keyboard navigation

Layer / File(s) Summary
Add Sprints navigation binding
apps/web/src/lib/navigation.ts
The Sprints navigation link now uses the g t keyboard binding.
Validate Sprints navigation
apps/web/tests/components/command-palette.test.tsx
Tests verify navigation to /sprints through command selection and gt. A competing t hotkey is not invoked.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: imshashank, pulkitxm

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy issue #98 by adding the g t Sprints binding and verifying keyboard navigation without shortcut conflicts.
Out of Scope Changes check ✅ Passed The navigation update and related command-palette tests remain within the scope of issue #98.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly summarizes the main change by identifying the new Sprints keyboard shortcut.
Description check ✅ Passed The description directly explains the Sprints shortcut, its conflict avoidance, and the related test coverage.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/web/tests/components/command-palette.test.tsx`:
- Around line 121-132: Add test coverage for buildSidebarNav’s Sprints entry,
verifying it exposes the /sprints route with binding “g t”. Update the
navigation test setup or add a focused sidebar test so it exercises
buildSidebarNav rather than only buildNavigation, and ensure the assertion would
fail if that binding or route regresses.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2ab32166-638c-40af-982b-54dd71c183e1

📥 Commits

Reviewing files that changed from the base of the PR and between 05ed2f2 and 518c23e.

📒 Files selected for processing (2)
  • apps/web/src/lib/navigation.ts
  • apps/web/tests/components/command-palette.test.tsx

Comment thread apps/web/tests/components/command-palette.test.tsx Outdated

@imshashank imshashank 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.

Thanks for this. g t is free, the binding registers correctly, and bun run verify is green with your branch merged into current main. A few changes before it lands.

1. Resolve the CodeRabbit thread. It is a fair catch, not noise: command-palette.test.tsx builds its sections with buildNavigation, so nothing in the suite touches the copy of the link you added to buildSidebarNav. Delete the binding from buildSidebarNav and every test still passes, which means the sidebar half of your change is untested. House rule is that a feature is not done until it has a test that would fail if the feature broke. Please add one that asserts /sprints carries binding: 'g t' in the sidebar nav, and reply on or resolve the thread yourself. We do not resolve contributor threads on their behalf.

2. Please revert the unrelated reformatting. Roughly half the diff is single-line link objects expanded across five lines each. Those lines are inside Biome's line width so the formatter does not require it, bun run lint passes either way, and it buries the one line that matters. Keep the diff to the binding: 'g t' addition and the test.

3. Merge main into your branch. It has moved a long way since you opened this and the fork never ran the lint, typecheck, test or build jobs, so nothing here has been checked against the tree it would land on. The Vercel entry is a fork authorisation prompt, not a build failure, so ignore that one.

Not something to fix here, but worth knowing since it is why you had to make the same edit twice: buildNavigation and buildSidebarNav maintain two copies of the same link table, so every navigation change has to be made in both and only one of them has test coverage. That duplication is on us and I am tracking it separately. If you would rather wait for that to be collapsed into one source before adding the binding, say so and I will ping you when it lands.

@imshashank

Copy link
Copy Markdown
Contributor

Heads up: the duplication I mentioned is now gone. #101 collapsed buildNavigation and buildSidebarNav onto one set of link tables, with a test that compares the two surfaces link by link so they cannot drift again.

That means your change gets simpler: after you merge main, adding binding: 'g t' to the single WORKSPACE_LINKS entry covers both the sidebar and the command palette, and the parity test will hold you to it. The CodeRabbit thread about buildSidebarNav going untested is addressed by that shared test, but please still reply on or resolve the thread yourself rather than leaving it open.

@SinghAstra

Copy link
Copy Markdown
Contributor Author

Sure i will fix it right away thanks for simplifying with single object

@imshashank

Copy link
Copy Markdown
Contributor

Heads up: main moved under this in a way that directly affects your change, and it moved in your favour.

g t collides with a single-key binding. apps/web/src/features/standup/standup-board.tsx:84 registers t to toggle the standup timer, scoped to the standup surface. On the main you branched from, selectMatch compared scope priority before specificity, so on the standup page the surface's t would have beaten your two-step g t and your shortcut would have toggled the timer instead of navigating. The same thing was already silently breaking g i, g a, g s and g p, which is how it was found.

#107 (merged, d2650ba) reversed that ordering: specificity decides first, and priority only breaks a tie between bindings of the same length. So g t now works everywhere, including on the standup board, without you changing anything.

Two things to do:

  1. Rebase on current main. Your branch predates the fix, and the collision is only invisible because your test renders a palette rather than the standup surface.

  2. Add the collision case to your test. Right now routes to sprints when the binding gt is pressed passes on a surface with no competing t, so it would have passed on the old main too, while the feature was broken in the place it actually mattered. A test that also registers a single-key t at HOTKEY_PRIORITY.surface and asserts g t still routes to /sprints is the one that proves the shortcut works. apps/web/tests/lib/keyboard/binding.test.ts has the pattern under describe('selectMatch priority').

The unrelated reformatting of ArchiveIssue in command-palette.test.tsx should come out: it is noise in the diff and Biome does not ask for it.

The CodeRabbit thread on this PR is still open and needs your reply, as does the one on #95.

@SinghAstra

Copy link
Copy Markdown
Contributor Author

@coderabbitai resolve

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/web/tests/components/command-palette.test.tsx`:
- Around line 127-145: Extend the test around Palette and StandupTimer to verify
the competing binding is active: after the Sprints command closes, send
standalone t, assert toggleTimer was called once, then clear the mock before
sending gt and retain the existing navigation and non-toggle assertions. If
standalone t does not trigger, configure the active standup scope in the test
setup.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8f67e556-994d-4e26-83c4-69c1c02c3f78

📥 Commits

Reviewing files that changed from the base of the PR and between 518c23e and 2fd6ce5.

📒 Files selected for processing (2)
  • apps/web/src/lib/navigation.ts
  • apps/web/tests/components/command-palette.test.tsx

Comment thread apps/web/tests/components/command-palette.test.tsx
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
✅ Action performed

Comments resolved. Approval is disabled; enable reviews.request_changes_workflow to allow explicit top-level @coderabbitai resolve or @coderabbitai approve commands.

@imshashank
imshashank merged commit 45410ec into Noveum:main Aug 7, 2026
2 of 3 checks passed
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.

UX: Missing keyboard navigation shortcut for Sprints

2 participants