Repository navigation
feat(web): default chat file links to one folder and mark home or root - #275
Merged
Merged
Conversation
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
orbitingflea
force-pushed
the
feat/file-link-path-depth
branch
from
November 24, 2026 08:55
34bd648 to
716ddc0
Compare
File link folders now default to 2 (one folder + file name). The walk goes up the full folded path and stops early at the thread machine's home (`~/`), at POSIX root (`/`) or at a Windows drive root (`C:/`), showing fewer folders than the setting there. The server reports its home in a new optional ServerConfig.homeDirectory; the web client reads it per environment through an atom holding only that string. Workspace files no longer stop at the workspace root, but a link written relative to the workspace (which may open a search match) shows only the folders it names. Unexpanded `~/` links are read against the reported home, and on a Windows server Git Bash `/c/...` paths are read as `C:/...`. Links ending in `.`, `..` or a bare `~`, and any copy of a repeated file name, get no prefix; a home at `/` or a drive root draws the root marker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
orbitingflea
force-pushed
the
feat/file-link-path-depth
branch
from
November 24, 2026 09:22
716ddc0 to
a70e746
Compare
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Behaviour change
Behaviour change: yes, web users see one folder on chat file links by default, and prefixes stop at
~/,/, or a drive root.Why
The goal is to show one folder on chat file links by default and stop at
~/or/. Before, the default was 1 and stopped at the project top.What changed
./paths in full, drop., fold.., and take up todepth - 1folders. Stop early at~/,/, or a drive root without using a slot. Relative links without./show only folders they name.homeDirectorytoServerConfigand read it per environment in a single-string atom.Scope
apps/server/src/ws.ts, 2 topackages/contracts/src/server.tsfor the optional field and doc comment, and change 1 fork hook line inapps/web/src/components/ChatMarkdown.tsxfor the environment.apps/web/src/fork/andpackages/contracts/src/fork/, plus oneREADME.mdline.Tradeoffs
Lexical
..folding is display-only after a symbolic link. Saved 1 values stay because they cannot be told apart from a chosen 1.Blast Radius
Only web chat file links and an optional
ServerConfigfield change. Old and new builds mix safely, and a revert undoes it.Verification
Unit, contract, and browser tests pass.
vp run check:changedpasses. Desktop and phone-size screenshots were checked.Full rule cases, tradeoffs, and verification
./links walk past the project top, so an absolute link to top-levelREADME.mdshowsproj/README.mdat depth 2, or~/proj/README.mdin home. Project-relative links like[readme](README.md)ordocs/a.mdcan open a search match elsewhere, so they show only folders they name, with no~/or/above. WrittenREADME.mdshows no folder, anddocs/review-pipeline/glossary.mdshows at mostdocs/review-pipeline/./home/me/code/proj/docs/guide.mdshowsdocs/guide.md. Server home draws~/, as in~/notes.mdand~/plans/todo.md. Unexpanded~/...links resolve againsthomeDirectory, so with/srv/me,~/../notes.mdshows/srv/notes.md; with no home, they draw~/. Root draws/, as in/README.mdand/etc/hosts. A Windows drive root draws the drive, such asC:/. On any Windows server, even with no reported home, a Git Bash path like/c/Users/alex/notes.mdreads asC:/Users/alex/notes.md, matching the server file reader, so it can draw~/orC:/. A home at/or a drive root draws that root, not~/.homeDirectorydraws plain folders except for unexpanded~/...links. The single-string atom keeps other server config updates from re-rendering chat messages. Repeated file names in one message, links to the home folder itself (~/), links ending in.or.., and POSIX names with\get no prefix. Repeats match by file name, so a root copy like/notes.mdnext to/etc/notes.mdalso gets no prefix. Repeated names keep their trailing folder hint, and UNC paths keep server and share without a root marker. Prefixes stay CSS-drawn, so find in thread and copied text keep the label unchanged, and the chip's accessible name includes the folders...folding can differ from disk after a symbolic link. Open and copy still use the link's path, so display alone differs. Saved 1 values stay because saved settings cannot tell a default 1 from a chosen 1. Home detection readshomeDirectoryfrom the server instead of guessing from the thread folder, which misses homes outside/home/<user>or/Users/<user>and threads outside home.~, workspace files,.., UNC paths, collisions,.and..links, and a home at/. Contract tests pass for the default and saved values. A browser test passes for default prefixesreview-pipeline/and/etc/, depth 1 with no prefix, server-reported home~/notes/, find in thread, triple-click, and accessible names.vp run check:changedpasses, desktop and phone-size screenshots were checked, and the "Folders on file links" line inREADME.mdis updated, noting that a browser that already saved its settings keeps its saved value and the reset button gives the new default.