feat(ui): surface --dir / pinned workspace for first-time users#389
Merged
feat(ui): surface --dir / pinned workspace for first-time users#389
Conversation
User feedback (multiple data points): beginners hit the default
cwd-scoped behavior and conclude Reasonix can't read folders other
than where they launched it. The capability already exists via
`reasonix code --dir <path>`, but nothing in the UI tells you so
until you read --help.
Three onboarding surfaces now make it discoverable:
- WelcomeBanner shows a "▸ workspace · /path (relaunch with --dir
<path> to switch)" line in code mode. Visible only on the empty
state, so it doesn't survive past the first turn.
- `/status` includes a workspace line:
workspace /path · pinned at launch (relaunch with --dir <path>
to switch)
- The filesystem sandbox-escape error now points the user at --dir
instead of just dropping a raw "path escapes sandbox root":
path escapes sandbox root (X): Y — workspace is pinned at
launch; quit and relaunch with `reasonix code --dir <path>` to
work in a different folder
Plus a Getting Started callout in both READMEs explaining --dir and
why mid-session switching isn't a thing (message log + memory paths
get tangled with stale roots, so the design pins at launch).
No new slash command, no /cwd. The agent's system prompt already
says mid-session switching was removed by design.
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.
Closes #370.
Why
Beginners hit the default cwd-scoped behavior and conclude Reasonix can't read folders other than where they launched it.
reasonix code --dir <path>exists today and works fine — it's just invisible until you--help. (The issue body suggested/cwdexists; it doesn't, and the agent's system prompt explicitly says mid-session retargeting was removed because the message log + memory paths get tangled with a stale root.)So this is purely an onboarding fix — no new capability, no
/cwdslash.Surfaces added
WelcomeBanner — shows a workspace line in code mode on the empty state:
/status— adds a workspace line:Filesystem sandbox-escape error — was a raw
path escapes sandbox root (X): Y; now points the user at the right fix:README + README.zh-CN — Getting Started subsection explaining
--dirand why mid-session switching isn't a thing.Tests
No new test file — all four surfaces are static text additions. Existing tests cover the unchanged code paths:
tests/filesystem-tools.test.ts— still asserts/escapes sandbox/(matches the new message prefix).tests/slash.test.ts— unaffected (workspace line only appears in/statuswhenctx.codeRootis set).Test plan
npm run verify— 134 files / 2152 passed / 1 skippedreasonix codeempty-state shows the workspace banner line/statusshows the workspace line in code modereasonix code --dir