Repository navigation
docs: stored client config follows the OS user config directory - #311
KrasimirKralev wants to merge 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesUpdates both CLI guides and the changelog to describe the OS-specific location of stored client configuration. Example: A Linux user sets XDG_CONFIG_HOME=/home/alex/settings and runs clickclack login.
Review scores
ProductKind: Docs · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR corrects a verified documentation error still present on main; the focused patch is correct and worth merging. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherCLI login saves credentials and client defaults through a shared config-path helper; later client commands read that same file. flowchart LR
A[OS environment] --> B[os.UserConfigDir]
B --> C[clientConfigPath]
D[CLI login] --> E[Save client config]
C --> E
E --> F[Config JSON file]
F --> G[Load client config]
C --> G
G --> H[CLI commands]
Technical reviewBest possible solution: Merge the focused documentation correction so both guides describe the existing shared config-path behavior. Do we have a high-confidence way to reproduce the issue? The main-branch guides contradict the shared config-path implementation; the supplied Linux CLI trace independently demonstrates the XDG_CONFIG_HOME case. Is this the best way to solve the issue? Correcting the two descriptions is the smallest complete fix and accurately follows Go's platform behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fb9b9314bdfe. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 30, 2026, 3:14 AM ET / 07:14 UTC. |
What Problem This Solves
The CLI docs say stored client config always lives at
~/.config/clickclack/config.json, but the client stores it under the OS user config directory, so on macOS, on Windows and on Linux withXDG_CONFIG_HOMEset, users look in the wrong place for the saved session.docs/cli.md:53anddocs/agent-friendly-cli.md:152name~/.config/clickclack/config.json;clientConfigPath()(apps/api/cmd/clickclack/client.go:476) usesos.UserConfigDir(), which is$XDG_CONFIG_HOME(default~/.config) on Linux,~/Library/Application Supporton macOS and%AppData%on Windows.clientConfigPath().User Impact
Users who want to inspect, delete or back up the stored session token (for example after
clickclack logoutor when switching servers) are told the real location on every OS.Why This Change Was Made
clickclack/config.jsonin the OS user config directory and list the Linux, macOS and Windows locations; one## UnreleasedCHANGELOG line.os.UserConfigDir().Evidence
clickclack loginstores the client config, and where later commands read it.go build ./cmd/clickclack, docs-only change on top of fb9b931), a scratchclickclack serve --dev-bootstrapon 127.0.0.1:18431, and a magic link minted withclickclack admin magic-link create.HOMEandXDG_CONFIG_HOMEpoint at separate scratch dirs.clickclack login --server http://127.0.0.1:18431 --magic-token mgt_…, thenls ~/.config/clickclack/config.json,findforconfig.json,clickclack whoamiwith the same and with anotherXDG_CONFIG_HOME.clickclackbinary,loginwrote$XDG_CONFIG_HOME/clickclack/config.jsonand nothing under~/.config;whoamiused the stored session only whileXDG_CONFIG_HOMEpointed at that directory, and fell back to the defaulthttp://localhost:8080with another one. That is theos.UserConfigDir()behaviour the corrected docs describe.os.UserConfigDir()behaviour.node scripts/build-docs-site.mjsbuilds the docs site with the change (exit 0).