Repository navigation
Stop trail hiding which repo a terminal is in - #749
Conversation
🌱 graft blast radius3 areas changed → 9 areas can be affected. 25 dependent symbols, depth 2. flowchart TB
A0(("Hook Management<br/>11 symbols"))
A1(("Initialization Process<br/>3 symbols"))
A2(("Cloud Notifications<br/>3 symbols"))
A3(("Note Management<br/>2 symbols"))
A4(("Telemetry Tracking<br/>2 symbols"))
AX(("4 smaller areas<br/>4 symbols"))
classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
class A0,A1,A2,A3,A4 reached;
classDef tail fill:#EEF2F3,stroke:#9AA4A9,stroke-width:1px,color:#3A4247;
class AX tail;
Who knows this code — 2 people across 12 areas
Ownership is git history over each area's own files, weighted towards recent work (120-day half-life). Merge commits and bots are dropped, and you are dropped from your own PR. A name with no All 25 dependent symbols, grouped by areaHook Management — 11 symbols in 11 files
Initialization Process — 3 symbols in 3 files
Cloud Notifications — 3 symbols in 3 files
Note Management — 2 symbols in 2 files
Telemetry Tracking — 2 symbols in 2 files
CLI Skills — 1 symbol in 1 file
rewriteWiring — 1 symbol in 1 file
Session Management — 1 symbol in 1 file
Tool Integration — 1 symbol in 1 file
Test signal per changed area — 1 ✓ · 1 ✗ · 1 –Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate.
63 test suites also reference this code63 symbols, kept out of the diagram and the table so they cannot crowd out the areas a reviewer has to look at.
Open the interactive graph → — click an area to see the code that changed, and the line that reaches it. |
The issue: After
trail init, a person's own Claude Code status line, the one that showed which folder the terminal is in, was replaced by trail's. With several terminal tabs open, they couldn't tell which repo each tab was in.Why: trail wrote its status line into
.claude/settings.local.json, which Claude Code ranks above~/.claude/settings.jsonand the repo's.claude/settings.json, so it hid a line set in either. trail's own line didn't name the folder either.The fix: trail now adds its status line only when neither of those files already has one that isn't trail's, and a re-run (or the rewire after an upgrade) takes back the line an older init wrote. When trail's line is the only one, it starts with the folder name.
Moves: inits that keep the person's own status line,
init_completedwith the newstatusline = 'theirs'(PostHog, Metabase db 11,posthog_event_full_view): none today, because the property is new in this PR. As of 2 Nov 2026, 0 of the 5,826init_completedevents from the last 7 days carry it (1,177 installs).What changed
mergeTrailLocal(src/claude/settings-merge.ts) takestheirs, the other settings Claude Code reads here, and leavesstatusLine/subagentStatusLineout of the local file when one of them already sets a line that isn't trail's. It warns the way it already did for a line in the local file, and returns which line shows:trail,theirsoroff.runTrailInitpasses it~/.claude/settings.jsonand the repo's.claude/settings.json.renderStatuslinetakes the folder (the project dir's basename) and puts it first:◤ web_app · trail · 5 nodes / 6 edges · ✓ synced.init_completedgetsstatusline, a closed set (trail/theirs/off), in the contract, TELEMETRY.md and the init call.--no-statuslineto keep a custom line, since it's kept now.Before and after
Real Claude Code 2.1.312 in a pseudo-terminal, a scratch home, trail built from this branch before and after the change.
A home whose
~/.claude/settings.jsonhas its own status line (folder | model):trail initnow says why:⚠ Existing statusLine left untouched (a session allows only one). To use Trail, point it at .trail/statusline.cjs.A home with no status line, two tabs:
trail check
It reports 4 conflicts, all keyword matches on unrelated learnings: one about the "Trail installed" nudge on
npm i -g, and one about hooks standing down in a sandbox that runs Claude with the real HOME. This change reads~/.claude/settings.jsononly for its status line, never for hooks. The one edge it leaves: Claude run with--setting-sources project,localwhile~/.claudehas a status line shows none, because trail steps aside for a line Claude won't load there.Tests
~/.claudeor the repo's settings and takes back trail's old one;runInitwith a home that has its own line writes none; the folder comes first;init_completeddrops astatuslinevalue outside the set.test (ubuntu-latest)passes. Locally,npm testwith a scratch HOME ran on a machine under heavy load, and its failures (deadline and timing tests, plus graft-to-trail, hosts-trail and upkeep-hooks) failed the same way on unchangedmainthere.🤖 Generated with Claude Code