refactor: format JSON snapshot files and add initial setup UI#257
Merged
Conversation
Evidence-based audit of the full new-user funnel: first load, wizard, reporter install (auth on/off), failure modes, and docs quick starts. Includes terminal captures, screenshots, and a prioritized punch list. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ftWMgeiHBdLbMeE7WBZ2Z
New users had no way to jump to their run from the terminal, a "not a git repository" warning leaked into every non-git test run, and every run reported "Piwi vunknown" because the bundled reporter resolved its own package.json from the wrong relative path. A missing API key on an auth-enabled server produced an unreadable stack dump instead of telling the user what to do; the "Get started" wizard never mentioned auth at all. A fresh instance with auth enabled had no UI path to create the first admin account, only a documented curl call — /login now offers a first-admin setup form when the users table is empty. On the home page, a project's first (partial) run was hidden by the default "Full runs only" filter with no indication anything had arrived, a failed API load rendered the onboarding wizard as if the instance were simply new, and the setup wizard sat below four marketing cards instead of leading the page. The projects list/detail empty states pointed at "the API" instead of the reporter, and the in-app API reference went blank with no error when its CDN script failed to load. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ftWMgeiHBdLbMeE7WBZ2Z
The README and getting-started quick starts skipped the chown needed for the container's non-root UID on Linux hosts (already documented in DOCKER.md/docs/deployment.md, but not at the two entry points most users follow). getting-started.md also taught the raw REST API before the recommended reporter integration; the reporter section now comes first and the curl example moves under an "optional" REST API section.
The findings have been applied; the report and its supporting screenshots were a working document, not a permanent artifact. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ftWMgeiHBdLbMeE7WBZ2Z
execOpts.stdio was inferred as a readonly tuple via `as const`, which doesn't satisfy execSync's mutable StdioOptions parameter type. Same runtime behavior, now explicitly typed instead of relying on const inference.
Contributor
Coverage Report for Reporter (./reporter)
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contributor
Coverage Report for Application (./application)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
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.
What & why
This PR makes two main changes:
JSON formatting: Reformats database migration snapshot files to use compact single-line arrays instead of multi-line formatting. This is a pure formatting change with no functional impact — arrays like
["token_hash"]are now on one line instead of spread across three lines.Initial setup UI: Adds a first-admin setup form to the login page for fresh instances with auth enabled and zero users. This mirrors the existing
POST /api/auth/setupAPI but makes it discoverable from the UI rather than requiring curl commands. The setup flow:/api/auth/setupon mount to determine if setup is neededneedsSetupis trueSupporting changes:
GET /api/auth/setupendpoint to check if initial setup is neededPOST /api/auth/setupto use the newneedsInitialSetup()helperneedsInitialSetup()function to check if users table is emptyrunUrl()helper for building dashboard URLs in the reporterHow was it tested?
Checklist
https://claude.ai/code/session_017ftWMgeiHBdLbMeE7WBZ2Z