Skip to content

Conversation

@mpcgrid
Copy link
Collaborator

@mpcgrid mpcgrid commented Dec 9, 2025

Fixed the issue where Cmd+Left Arrow was being intercepted by the TreeView component on task runs screen.

Solution:
Added a check in the getTreeProps keyboard handler to detect when metaKey (Cmd on macOS) is pressed with Left Arrow. When detected, the handler returns early without preventing the default browser behavior, allowing Chrome's native back navigation to work.

Closes #

✅ Checklist

  • [ x] I have followed every step in the contributing guide
  • [ x] The PR title follows the convention.
  • [ x] I ran and tested the code works

Testing

Went to the task details page and confirmed that Cmd + Left Arrow will navigate back


Changelog

Modified TreeView.tsx to check for e.metaKey before handling Left Arrow key events
When Cmd+Left is pressed, the event is no longer prevented, allowing browser default behavior

…eView component.

Solution:
Added a check in the getTreeProps keyboard handler to detect when metaKey (Cmd on macOS) is pressed with Left Arrow. When detected, the handler returns early without preventing the default browser behavior, allowing Chrome's native back navigation to work.

Changes:

Modified TreeView.tsx to check for e.metaKey before handling Left Arrow key events

When Cmd+Left is pressed, the event is no longer prevented, allowing browser default behavior
@changeset-bot
Copy link

changeset-bot bot commented Dec 9, 2025

⚠️ No Changeset found

Latest commit: afe4e12

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 9, 2025

Walkthrough

The pull request modifies keyboard event handling in the TreeView component by adding a meta key guard condition to the Left/ArrowLeft key handler. When the Meta key is pressed during a Left arrow key event, the handler returns early, preventing the default left navigation behavior from executing. This change leaves all other Left arrow key behavior unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify that the meta key check is the correct conditional guard (e.g., confirm whether it should be metaKey vs other key combinations like ctrlKey or shiftKey)
  • Confirm the intended user interaction: what should happen when Meta+Left is pressed and whether early return is the correct behavior
  • Test that standard Left arrow navigation still functions correctly when Meta is not held

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically identifies the main change: fixing Cmd+Left Arrow interception by the TreeView component.
Description check ✅ Passed The description follows the template structure with completed checklist, testing section, and changelog, addressing the issue and solution clearly.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/tri-6731-cmd-left-arrow-does-not-work-when-focusing-on-a-task

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 and usage tips.

@mpcgrid mpcgrid changed the title Fixed the issue where Cmd+Left Arrow was being intercepted by the Tre… fix(webapp) : fixedCmd+Left Arrow was being intercepted by the TreeView component Dec 9, 2025
@mpcgrid mpcgrid changed the title fix(webapp) : fixedCmd+Left Arrow was being intercepted by the TreeView component fix(webapp) : fixed Cmd+Left Arrow was intercepted by the TreeView component Dec 9, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/webapp/app/components/primitives/TreeView/TreeView.tsx (1)

424-453: Cmd+Left passthrough looks correct; consider symmetric handling for Cmd+Right

The if (e.metaKey) { return; } guard before e.preventDefault() cleanly restores the browser’s Cmd+Left back navigation without impacting normal Left/ArrowLeft tree behavior. This is a safe, targeted change.

Optionally, for symmetry and to also allow the common Cmd+Right “forward” navigation, you could apply the same e.metaKey early-return pattern in the "Right"/"ArrowRight" case as well.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b71bf89 and 55ea547.

📒 Files selected for processing (1)
  • apps/webapp/app/components/primitives/TreeView/TreeView.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Use types over interfaces for TypeScript
Avoid using enums; prefer string unions or const objects instead

Files:

  • apps/webapp/app/components/primitives/TreeView/TreeView.tsx
{packages/core,apps/webapp}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use zod for validation in packages/core and apps/webapp

Files:

  • apps/webapp/app/components/primitives/TreeView/TreeView.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use function declarations instead of default exports

Files:

  • apps/webapp/app/components/primitives/TreeView/TreeView.tsx
apps/webapp/app/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)

Access all environment variables through the env export of env.server.ts instead of directly accessing process.env in the Trigger.dev webapp

Files:

  • apps/webapp/app/components/primitives/TreeView/TreeView.tsx
apps/webapp/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)

apps/webapp/**/*.{ts,tsx}: When importing from @trigger.dev/core in the webapp, use subpath exports from the package.json instead of importing from the root path
Follow the Remix 2.1.0 and Express server conventions when updating the main trigger.dev webapp

Files:

  • apps/webapp/app/components/primitives/TreeView/TreeView.tsx
**/*.{js,ts,jsx,tsx,json,md,css,scss}

📄 CodeRabbit inference engine (AGENTS.md)

Format code using Prettier

Files:

  • apps/webapp/app/components/primitives/TreeView/TreeView.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)

@mpcgrid mpcgrid self-assigned this Dec 9, 2025
@mpcgrid mpcgrid merged commit 07a31d3 into main Dec 10, 2025
28 checks passed
@mpcgrid mpcgrid deleted the fix/tri-6731-cmd-left-arrow-does-not-work-when-focusing-on-a-task branch December 10, 2025 12: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.

3 participants