Skip to content

Conversation

@lukemelia
Copy link
Contributor

No description provided.

@lukemelia lukemelia requested review from a team and backspace January 20, 2026 19:53
@habdelra habdelra requested a review from Copilot January 20, 2026 20:00
@github-actions
Copy link

Preview deployments

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes navigation of FileDef links in code mode by preventing automatic extension fallbacks for files that already have non-executable extensions. Previously, requests for files like .md would incorrectly attempt to add executable extensions or redirect.

Changes:

  • Added hasExtension() utility function to detect if a path contains a file extension
  • Modified realm file handling to skip extension fallbacks for non-executable files with extensions
  • Updated code mode navigation to use hasExtension() instead of checking only for .json extension

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/runtime-common/url.ts Adds hasExtension() helper to detect file extensions in URLs or paths
packages/runtime-common/realm.ts Updates file request handling to avoid fallback extensions for non-executable files that already have extensions
packages/realm-server/tests/card-source-endpoints-test.ts Adds test verifying non-executable files (e.g., .md) are served without redirect
packages/host/tests/acceptance/code-submode/file-def-navigation-test.gts Adds acceptance test for navigating to markdown files via FileDef links in code mode
packages/host/app/components/operator-mode/code-submode/module-inspector.gts Updates card navigation to use hasExtension() for broader file type support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Jan 20, 2026

Host Test Results

    1 files  ±  0      1 suites  ±0   1h 38m 7s ⏱️ + 9m 20s
1 894 tests +213  1 877 ✅ +215  17 💤 ±0  0 ❌  - 1 
1 909 runs  +214  1 892 ✅ +217  17 💤 ±0  0 ❌  - 2 

Results for commit 8397b84. ± Comparison against base commit 743df5f.

This pull request removes 1 and adds 214 tests. Note that renamed tests count towards both.
Chrome ‑ Global error: Uncaught TypeError: Failed to fetch at http://localhost:7357/assets/chunk.9c8e4eccabdfee0d9873.js, line 150984  While executing test: Integration | card-copy: copy button does not appear when right and left stacks are the same index item and there is a selection on one side 
Chrome ‑ Acceptance | code submode | file def navigation: clicking embedded file in preview opens markdown file in code mode
Chrome ‑ Integration | Store: added instance that was previously not saved will begin to auto save after being added
Chrome ‑ Integration | Store: an instance can be restored after a loader reset
Chrome ‑ Integration | Store: an instance can debounce auto saves
Chrome ‑ Integration | Store: an instance can live update thru an error state
Chrome ‑ Integration | Store: an instance live updates from indexing events for a code update
Chrome ‑ Integration | Store: an instance live updates from indexing events for an instance update
Chrome ‑ Integration | Store: an instance that started out with a local ID can be restored after a loader reset
Chrome ‑ Integration | Store: an instance will NOT auto save when its data changes, if the user does not have write permissions
Chrome ‑ Integration | Store: an instance will auto save when its data changes
…

♻️ This comment has been updated with latest results.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

2 participants