fix: show resolved path in setup wizard's config location picker - #855
fix: show resolved path in setup wizard's config location picker#855kishore280 wants to merge 6 commits into
Conversation
|
@akramcodez kept this minimal on purpose. Just added the resolved file path next to each option in the location picker so you can see where it's about to write before confirming, e.g.: Didn't touch the UI beyond that — if no provider's configured, the chat panel still just sits stuck on "Loading models..." with no real feedback. Left that out of scope here, happy to pick it up separately if any UI changes are planned down the line. |
|
Hey @kishore280 - thanks for this, the direction is right and the changeset/scope are clean. Two things I'd like fixed before merge:
Smaller points:
|
|
@kishore280 thanks for the quick turnaround. Point 1 and all the smaller points are sorted: the separator boundary fix looks right, the shared helper in Point 2 isn't fixed yet though. Rendering the path on its own line was the right call, but the budget still doesn't match the space the row actually has, so the original symptom still reproduces.
I rendered the step inside the real wizard container with a deep project dir:
const {boxWidth, isNarrow} = useResponsiveTerminal();
const pathBudget = Math.max(10, boxWidth - 10);That also drops the 76 cap, which was truncating paths that had room to fit on a wide terminal. One new thing while I was in there: Smaller points:
Everything else passes on the branch ( |
…width Also drops the 76-char cap, replaces the null-separator label hack with a typed path field on LocationOption, adds a regression test that renders inside the real wizard box, and fixes a circular test assertion.
akramcodez
left a comment
There was a problem hiding this comment.
Hey @kishore280, this looks really good now! I checked the latest changes against all of Will's feedback, and everything substantive has been addressed.
The path boundary issue, truncation calculation, shared helper, typed path handling, and the regression tests are all sorted. I also checked the updated tests and the relevant typecheck/lint/format checks - everything looks good.
There are just a couple of very minor cosmetic points left, like the spacing before the path and the small cleanup around the inline values. Nothing blocking.
Please fix those minor issues when you get a chance, and otherwise its completely ready. Great work addressing the review feedback!
Fixes #852.
The location picker offered "Global user config" vs "Current project
directory" as bare labels, no path shown either way. No way to know
which directory you were about to write into before confirming.
Now shows the resolved path next to both options, home-relativized
with
~, on its own line under the label so it gets the full rowwidth instead of fighting the label for space on one line. Truncated
from the middle (keeps both the root and the leaf directory visible)
using a budget derived from boxWidth - the actual space the row has
inside the wizard's bordered, padded box, not the raw terminal width.
Ran: test:ava on location-step.spec.tsx, path.spec.ts,
useTerminalWidth.spec.tsx, styled-select-input.spec.tsx,
app-container.spec.tsx (51 pass), test:types, test:lint, test:format,
test:knip.