Skip to content

fix(server): expand home-relative media paths - #15618

Merged
maria-rcks merged 2 commits into
pingdotgg:mainfrom
maria-rcks:fix/round2-wide-15601
Oct 5, 2026
Merged

maria-rcks merged 2 commits into
pingdotgg:mainfrom
maria-rcks:fix/round2-wide-15601

Conversation

@maria-rcks

@maria-rcks maria-rcks commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

home-relative media links such as [repro.mp4](~/Downloads/repro.mp4) reached the server unchanged for /var/home workspaces and were looked up under <project>/~/Downloads. expand media paths with the environment's actual home before workspace-relative resolution, using the existing home-expansion helper.

  • blacksmith: reproduced the original missing-file error before the fix; 147 tests passed across asset access, home expansion, markdown links, terminal links, and shared media resolution after the fix. the regression resolves signed URLs and reads the media response for workspaces inside and outside home, and without workspace context.
  • blacksmith: scoped formatting and lint passed with one warning on unchanged code; server typecheck passed. absolute/relative media paths, workspace containment, and existing symlink protection are covered by the existing asset tests.
  • unverified: real provider/client playback on a Fedora /var/home account and native desktop/mobile behavior. the parent-owned shared preview currently times out; runtime evidence is pending.

Closes #15601

model: gpt-6.1-sol (xhigh) · harness: codex through t3 code

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Oct 4, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 4, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 9432428

Macroscope's review found this PR approvable — This is a narrowly scoped server bug fix that expands home-relative media paths into the existing validated absolute-file flow. Regression coverage exercises the supported path formats and workspace contexts without changing schemas, defaults, or security-sensitive configuration.

Notes:

  • No code objects were reviewed. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5f2b7d61-f58b-4c62-80e7-5e45ba225985
📥 Commits

Reviewing files that changed from the base of the PR and between 4ee6bfd and 3ce5cfe.

📒 Files selected for processing (2)
  • apps/server/src/assets/AssetAccess.test.ts
  • apps/server/src/assets/AssetAccess.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

Media-file issuance now expands home-directory syntax before path resolution. Tests cover tilde paths with both slash styles and workspaces inside, outside, or absent.

Changes

Media path resolution

Layer / File(s) Summary
Expand and validate media paths
apps/server/src/assets/AssetAccess.ts, apps/server/src/assets/AssetAccess.test.ts
Media-file issuance expands home-relative paths before checking whether they are absolute. Tests verify URL resolution and returned file bytes for both slash styles and different workspace configurations.

Priority: ➖ Normal

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

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 3ce5c

Home-relative media links appear ready to merge after normal checks. Playback on the reported Fedora desktop remains unverified, but no actionable failure is established.

Architecture Summary

Architecture risk: 🔵 Low · up to 3ce5c

The change affects 1 system.

Changed systems: apps/server

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — apps/server (service) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in apps/server/src/assets/AssetAccess.test.ts: Adds the node:os import for the test’s home-directory mock.
  • observed — Modified behavior in apps/server/src/assets/AssetAccess.test.ts: Mocks node:os while preserving its actual exports, and wraps homedir in a spy.
  • observed — Modified behavior in apps/server/src/assets/AssetAccess.test.ts: Adds a test for home-relative media paths in both slash styles, with a workspace inside the home directory, outside it, or absent. It sets the mocked home directory, then checks that each issued URL resolves to the canonical MP4 file and that serving it returns the expected bytes; the mock is restored in a finally block.
  • observed — Modified behavior in apps/server/src/assets/AssetAccess.ts: Adds the expandHomePathWith import used to expand media paths.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #15601 requires ~/... media links to resolve under the environment home and load the existing file. issueAssetUrl now applies expandHomePathWith before workspace-relative resolution. The r…
Out of Scope Changes check ✅ Passed The changes are limited to home-expanding media paths in AssetAccess.ts and a regression test in AssetAccess.test.ts. Both changes directly support issue #15601. No unrelated changes appear in the…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Title check ✅ Passed The title clearly and concisely describes the main change: expanding home-relative media paths on the server.
Description check ✅ Passed The description explains the problem, the fix, and focused verification results, and it links the related issue. It does not include explicit template headings or document maintainer approval or why t…
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@macroscopeapp
macroscopeapp Bot dismissed their stale review October 4, 2026 12:31

Dismissing prior approval to re-evaluate 9432428

@maria-rcks
maria-rcks merged commit f4153a7 into pingdotgg:main Oct 5, 2026
32 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Oct 5, 2026
## What's Changed
* fix(cli): reject accidental server launches by @maria-rcks in pingdotgg/t3code#15795
* feat(clients): reach one environment over several routes by @juliusmarminge in pingdotgg/t3code#15467
* feat(clients): learn an environment's LAN and tailnet addresses by @juliusmarminge in pingdotgg/t3code#15468
* fix(server): share MCP tool presentation across providers by @juliusmarminge in pingdotgg/t3code#15475
* revert(chat): remove automatic file-link repair by @maria-rcks in pingdotgg/t3code#15824
* perf(web): validate monospace fonts when selected by @maria-rcks in pingdotgg/t3code#15642
* fix(server): expand home-relative media paths by @maria-rcks in pingdotgg/t3code#15618
* fix(server): recover Linux runtime directory for device hub by @maria-rcks in pingdotgg/t3code#12402
* fix(web): center icons in thread details icon buttons by @RakshithBhat03 in pingdotgg/t3code#15669
* fix(mobile): back from an agent's thread returns to its parent by @AKolenda in pingdotgg/t3code#15068
* fix(dev): worktree setup never deletes a real env file by @juliusmarminge in pingdotgg/t3code#15845
* fix(server): drop the duplicate Option import that breaks main CI by @juliusmarminge in pingdotgg/t3code#15847
* fix(dev): write bootstrap warnings directly to stderr by @maria-rcks in pingdotgg/t3code#15865
* fix(mobile): a message that fails to send now says why in the thread by @shivamhwp in pingdotgg/t3code#15807
* fix(server): queue background notifications during active tools by @Yash-Singh1 in pingdotgg/t3code#15892
* refactor(server): share one keyed lock that releases idle keys by @juliusmarminge in pingdotgg/t3code#15577


**Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261004.2657...v0.0.46-nightly.20261005.2667

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261005.2667
github-actions Bot added a commit to davidvanderklay/t3code-flake that referenced this pull request Oct 5, 2026
## What's Changed
* fix(cli): reject accidental server launches by @maria-rcks in pingdotgg/t3code#15795
* feat(clients): reach one environment over several routes by @juliusmarminge in pingdotgg/t3code#15467
* feat(clients): learn an environment's LAN and tailnet addresses by @juliusmarminge in pingdotgg/t3code#15468
* fix(server): share MCP tool presentation across providers by @juliusmarminge in pingdotgg/t3code#15475
* revert(chat): remove automatic file-link repair by @maria-rcks in pingdotgg/t3code#15824
* perf(web): validate monospace fonts when selected by @maria-rcks in pingdotgg/t3code#15642
* fix(server): expand home-relative media paths by @maria-rcks in pingdotgg/t3code#15618
* fix(server): recover Linux runtime directory for device hub by @maria-rcks in pingdotgg/t3code#12402
* fix(web): center icons in thread details icon buttons by @RakshithBhat03 in pingdotgg/t3code#15669
* fix(mobile): back from an agent's thread returns to its parent by @AKolenda in pingdotgg/t3code#15068
* fix(dev): worktree setup never deletes a real env file by @juliusmarminge in pingdotgg/t3code#15845
* fix(server): drop the duplicate Option import that breaks main CI by @juliusmarminge in pingdotgg/t3code#15847
* fix(dev): write bootstrap warnings directly to stderr by @maria-rcks in pingdotgg/t3code#15865
* fix(mobile): a message that fails to send now says why in the thread by @shivamhwp in pingdotgg/t3code#15807
* fix(server): queue background notifications during active tools by @Yash-Singh1 in pingdotgg/t3code#15892
* refactor(server): share one keyed lock that releases idle keys by @juliusmarminge in pingdotgg/t3code#15577


**Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261004.2657...v0.0.46-nightly.20261005.2667

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261005.2667
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ~/ media links fail on Fedora Atomic homes under /var/home

1 participant