Repository navigation
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
The project and project_local rows in the precedence rail are scoped to knobs.cc's own current working directory — wherever npm run tauri dev (or the built bundle) was launched from — not to a user-specified Claude Code session.
In practice this means:
- If a developer launches knobs.cc from
~/Projects/knobs.cc/, the project layers read~/Projects/knobs.cc/.claude/settings.jsonandsettings.local.json. Those are config for this repo, not for any claude session the user actually cares about inspecting. - The current rail copy (the path string) reads as a real, authoritative project entry. A user who clicks a key and sees the
projectlayer marked as winning might trust a value that came from an unrelated repo. - The two file-based project layers are the only ones in the precedence model that are inherently relative to where claude is running.
managed,env,user, anddefaultare global from any caller's perspective.cliis per-invocation but already greys out (tracked in Read another running claude process's argv + env (the "runtime introspection" layer) #11) precisely because it can't be answered without a process target.
Same axis as #11, applied to "where is claude running?" instead of "what argv/env does claude have?". Both questions need the app to know which claude session it's grounding itself in.
Short-term: grey out the rail rows
For now, treat project and project_local like cli — render them at reduced opacity in PrecedenceRail so users don't trust a project value that came from an unrelated dir.
UI scope (shipping with this issue's opening commit):
PrecedenceRailrows forprojectandproject_localgetdisabled: true(opacity-45).- No backend change:
read_settings_layerskeeps reading the files;SettingsListrows,SourceBadge, presence cells, andKeyDrawerare untouched.
That's a stopgap, not a fix.
Longer-term: ground project visibility in a chosen claude session
A few framings, none committed:
- Attach mode (parallel to Read another running claude process's argv + env (the "runtime introspection" layer) #11's Proposal A). Enumerate running
claudeprocesses, let the user pick one, use its CWD to resolve project/project_local. Pairs naturally with Read another running claude process's argv + env (the "runtime introspection" layer) #11 — samesysinfo-based discovery layer. - Launch mode (instrumentation harness). knobs.cc spawns
claudeitself with a chosen directory and CLI args. Because we exec'd the process we know its CWD, argv, and starting env without scraping/procorsysctl. Doesn't help users with an already-running claude. - Path picker mode (no claude dependency). Drop the "match a running claude" framing entirely and just ask the user "which directory should I treat as your claude project?" — falls back to the current CWD if unset. Cheapest to implement; bypasses the discovery + permissions work in Read another running claude process's argv + env (the "runtime introspection" layer) #11.
- Some combination. e.g. ship (3) immediately to unblock the rail, then layer (1) or (2) on top once Read another running claude process's argv + env (the "runtime introspection" layer) #11 lands so the picker auto-fills from a chosen process.
Open design questions
- Is project visibility one feature with Read another running claude process's argv + env (the "runtime introspection" layer) #11, or a sister feature? Same OS-level problem and same UX (process picker), but path picker (proposal 3) is a viable path that doesn't depend on Read another running claude process's argv + env (the "runtime introspection" layer) #11 at all.
- Do project/project_local follow whichever claude session is selected, or is the path a separate user choice that can diverge from the running process? Both are defensible.
- Should the rail show the chosen path in a dedicated header strip ("scoped to: /Users/sam/proj/foo") so users always know what context they're inspecting?
Related
- Read another running claude process's argv + env (the "runtime introspection" layer) #11 — Runtime introspection (argv + env) for a running claude process. Same axis; the picker/discovery work overlaps. Path picker (proposal 3) is independent of Read another running claude process's argv + env (the "runtime introspection" layer) #11; attach mode (proposal 1) shares its plumbing.
src/components/inspector/PrecedenceRail.tsx— where the greyout lands.src-tauri/src/settings.rs—read_settings_layersreads project files relative tostd::env::current_dir()today; needs a session-relative root for any of the long-term proposals.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
Grey out project/project_local in the precedence rail (#12)
Sync docs with the cli (#11) and project (#12) coverage gaps
samkeen commentedon May 13, 2026
Resolved by #15.
The inspector now grounds against a chosen claude session: a topbar
SessionPillenumerates same-UIDclaude/claude-codeprocesses viasysinfoand reads each one's cwd, so theproject/project_localrail rows resolve to the attached session's directory rather than knobs.cc's launch dir. When no claude is running, a native folder picker (tauri-plugin-dialog) lets the user point at a project directory directly — that's proposal 3 from the issue body, kept as the fallback rather than dropped.UX shape:
spec/attach-mode.md"Open questions").Implementation contract:
spec/attach-mode.md.Out of scope for v1 (deferred): Windows (sysinfo doesn't expose another process's environ), containerised / sandboxed claude, remote / SSH inspection. All three fail gracefully with honest empty states; tracked in attach-mode.md "Non-goals."
Merge pull request #15 from AlteredCraft/feat/attach-mode
samkeen commentedon May 16, 2026
Shipped on
feat/attach-mode— see commits f49836c ("Ground inspection in a chosen claude session (#11, #12)") and 0a5ac27 (PR #15 merge).read_settings_layersnow acceptsattached_pid/project_root_overrideargs; project / project_local rows in the rail are grounded against the chosen session's cwd or the picked project root rather than knobs.cc's own launch dir. Path-picker fallback covers the no-attached-claude case.