Repository navigation
Lost the first-run password: reset-admin; the Your account step; adding a missing book; invite and job wording - #307
Merged
Merged
Conversation
…and invite wording Set up your server gains Your account as step 1 and moves Connect a phone to the end, with how signing in works. A lost first-run password is now fixed with reset-admin (the sign-in reminder each start prints, and the command for Docker, Unraid, Synology, a package or a terminal) before any database reset. The marketplace is preselected from the browser until one is chosen. Health gains the ASIN-not-in-the-database card, Not found rows and the match dialog offer Add it, the overview and Books point at Match automatically, the certificate warning follows self-signed mode, and failed Bridge jobs keep their last step. Part of server#369, server#192, server#370 and server#386.
…API fields Documents the reset-admin command (refusals, exit codes, what it revokes and how a running server sees it), the start's sign-in hint and the server_state keys first_admin and metadata_region_chosen, the token cache's one-minute re-read, PATCH /admin/users username, username_required and current_password_incorrect, GET /admin/setup printed_password and the new step order, GET /admin/settings metadata.region_chosen, and Health's unknown_asin kind. The console notes cover the login hint, the region preselect, Add it, the not-matched notice, the invite certificate rule, the typed invite code and a failed job's last step. Part of server#369, server#192, server#370 and server#386.
…console notices capture-setup.mjs drives the flow in its new order (Your account first, the Bridge skipped, Connect a phone last with Finish setup) in an en-GB browser, so the metadata step shows the marketplace preselected from the browser. Adds setup/account.png and recaptures the setup shots, the sign-in page's first-run hint, and the not-matched notice on the overview and Library > Books. The finish card's alt text now says it lists one skipped step, as it does. Part of server#369, server#192 and server#370.
…iobookshelf step The invite card's certificate notice now says why the browser will warn: the server's self-signed certificate, or https at an IP address. The Audiobookshelf step records done on Continue whether or not the import was opened, the nearest-marketplace lookup falls back to the US store, and the lost-password entry points at the command table, since the start's reminder stops once an admin signs in. Part of server#369, server#192 and server#386.
… not-matched notice The palette, bell, phone-width overview and books table shots are taken over the overview or Library > Books, which now lead with the not-matched notice. The capture comments and the finish card's hint say what the flow really records: the Audiobookshelf step done, the Bridge step skipped. Part of server#370.
…'s order A server never started with --setup now answers GET /setup with the same 303 to /admin as a closed wizard, not 404, so the console's sign-in probe logs no failed request. reset-admin on the first-run admin turns printed_password false, so the Your account step stops saying the password came from the log. The step changes the password before the rename, so a wrong current password leaves the username unchanged. Also folds the token-cache detail into one sentence that links to Tokens, and points the unknown-ASIN generation rule at its one home in Overview. Part of server#369.
The restore refusal and the failed auth-code revoke were explained only in Troubleshooting, so a reader sent from an install page to "If you lose the password" never saw them. They now sit in that section's list, and Troubleshooting links to it. Also fixes a capture comment that still spoke of two skipped setup steps after the phone step stopped being skipped. Part of server#369.
A username given on a server with no admin is a usage error (exit 2), not the "no admin yet" exit 1. A server running as root prints its docker exec line without -u. reset-admin notes its password through auth.NoteOwnPassword, the rule a password the admin chose follows. Part of server#369.
…ng apply Health leaves the unknown_asin kind out whenever the report can't run: report_unknown off, community metadata off, or a demo server, not only the first. The setup flow's metadata step saves the region only while lookups are on, so turning them off leaves region_chosen false. A public name gets the self-signed invite warning while the server runs self-signed, since a proxy in front of it can't be told apart. Part of server#369 and server#370.
Any admin's password sign-in ends the start's reminder, the apps' sign-in included, not only the console's. The data folder list again says that backups/ holds them only unless another backups folder is set, a caveat lost in the rewrite. Part of server#369.
This was referenced Nov 14, 2026
KodeStar
added a commit
to KodeStar/audiosilo-server
that referenced
this pull request
Nov 14, 2026
…t in setup, the nearest Audible marketplace (#389) A server installed with Docker (or any headless start) creates `admin` with a random password and prints it once. Recreate the container and it is gone, the console had no way to choose your own, and the sign-in page pointed at a setup link the log never had. This makes first sign-in recoverable and lets the admin pick their own account. Closes #369, closes #192. ## What changes **Lost the first-run password: `reset-admin`** - New command `audiosilo [--data DIR] reset-admin [username]`. It sets a fresh random password for the only admin (or the one named) through the console's own set-password path, prints it, and revokes the first-run auth code printed beside the old password. Sessions end. A running server accepts the new password at once, and a cached session ends within a minute (restart to end it at once). - It refuses a missing or non-AudioSilo database, pending migrations, and a backup restore waiting for the next start. Exit codes: 0 ok, 1 refused or failed (if revoking the code fails, the new password is still printed first), 2 usage. - Until the first-run admin first signs in to the console with a password (or changes it), every later start logs a reminder with the exact command for where it runs: `docker exec -u <uid>:<gid> <container> audiosilo --data /data reset-admin` in our image (the server's own ids, so no root-owned files), the full `/app/audiosilo/audiosilo --data /config` path on the linuxserver image. The plaintext is never stored; the reminder is a hint only (owner decision, V2.7.0-PLAN decision 6). - The state is a `server_state` row `first_admin` written only by `ensureAdmin` when it creates the admin, so upgraded servers and `--setup` installs never show the reminder. No migration. - The auth token cache re-reads a cached row once it is a minute old, so a reset from another process reaches a running server. **Console setup flow** - New first step **Your account**: change the username and choose a password (skippable). Reverses FIRST-RUN-PLAN.md decision 1 (V2.7.0-PLAN decision 5). The password changes before the rename, so a wrong current password leaves the name alone. - **Connect a phone** moves to the end and explains sign-in: scan with the app, the log's auth code works there, other people need an invite. - The sign-in page says what a new server's username and password are and where the password is; the "open the setup link" line shows only while `/setup` is open. - **#192:** the Audible marketplace step preselects the marketplace nearest the admin (browser language region, then time zone, nearest-marketplace mapping, US fallback) while no region was ever chosen; config.yaml and `AUDIOSILO_METADATA_REGION` are never overridden. Settings > Community metadata offers the same suggestion as a row until a region is chosen. (The issue assumed the default was `us`; it is "No preference".) ## Wire (all additive) - `GET /admin/setup`: `printed_password` (bool). - `GET /admin/settings`: `metadata.region_chosen` (bool). - `PATCH /admin/users/{id}`: optional `username`; 400 `username_required`, 409 `username_taken`. `POST /admin/users` also answers `username_required`. - `POST /auth/password`: a wrong current password is still 401, now with `code: current_password_incorrect` (shared with the player; shipped builds unaffected). - `GET /setup` on a server that never enabled the wizard now 303s to `/admin` (was 404), the same answer as a closed wizard, so the console's probe logs no 404 and a signed-out caller learns less than before. - Setup step ids: `account` first, `phone` last. ## Tests and review - Go: reset-admin (one admin, named, several unnamed, unknown name, no admin, foreign file, pending migrations, pending restore, revoke failure, the code it revokes and keeps), the reminder state (upgrade, `--setup`, once-only writes, failed mark), rename authz (allowed and denied), the /setup answers, the token cache re-read. Console: the account step (order, wrong password, refused name), the locale/time zone mapping, preselect only when never chosen. - Gate green: `scripts/build-admin.sh`, `go build/vet/test -race`, golangci-lint, and the native-engine vet/test/lint. - Review: /simplify + /code-review two passes at the ★ level (high-x2, Fable 5.2), then two fix rounds at high (Opus). ## Verified live (Playwright, real builds) - Fresh headless start: banner; restart: the reminder; `reset-admin` while running: the new password signs in at once, the old code and sessions get 401; after a console sign-in, no reminder. A data dir from main (3b03e1c) upgraded: no reminder. `--setup`: no reminder. - Docker: the printed `docker exec -u 1026:100 ...` command works on a non-root volume and files stay 1026:100. - Sign-in page: hint shown, no console errors, setup line only with `/setup` open. - Setup: Your account first (wrong password message in English and German, rename + new password, skip), phone step last with its Invite link. - Marketplace: en-GB/London -> United Kingdom, de-AT/Vienna -> Germany, unmapped -> United States, env-locked and config values kept, the Settings offer row. Not verified: a real NAS (Synology/Unraid) container run. Pairs with #390 (independent) and KodeStar/audiosilo-docs#307.
KodeStar
added a commit
to KodeStar/audiosilo-server
that referenced
this pull request
Nov 14, 2026
… found, ASINs the database doesn't know; invite and Bridge job polish (#390) A new user moving from Audiobookshelf could not find bulk matching, hit a dead end when a book was not in the community database, and had no way to see books whose own ASIN the database does not know. This puts Match automatically where people look, gives "not found" a next step, and folds in the invite and Bridge-job polish left from batch B. Closes #370. Part of #386 (everything except the player's `has_cover`, which needs a player change and stays open there). ## server#370: matching surfaces - Overview and Library > Books show "N books not matched" with **Match automatically**, opening the bulk match card. - A **Not found** row in bulk match and the match dialog's empty state say the book is not in the community database yet and still plays as normal, with **Add it**, a link to `https://meta.audiosilo.app/add?q=...` prefilled with, in order, an ASIN the admin typed, the book's ASIN, the search words, or title and author. (meta's add page is `/add`; `/contribute` takes no prefill.) - Health gets its own state, **ASIN not in the community database**, from the existing `unknown_asin_reports` table, listed while the unknown-ASIN report (Help complete the community database) is on. Such books still count as matched: making them unmatched would let Match automatically replace an ASIN the admin set (follow-up). The table's userstate rule now moves the content generation on a new or flipped row so the Health cache stays exact (measured: one move per report commit). - Findings that were wrong: tag ASINs have not counted as matched since 0067; Overview already linked to Not matched. ## server#386: polish - Invite dialog: the certificate warning shows for https when the server runs self-signed (any name) or the link is at an IP address, with a sentence for each reason. - Invite page: wording for someone who typed a code rather than following a link. - A second Share press while the share sheet is open is ignored. - Settings > Bridge > Jobs: failed and cancelled jobs keep their last step. - LibriVox fetch ids are checked with `model.ValidSlug`; the `Adopted` tri-state has named states; one console `failureCode`; `useTrackedJob` moved into the bridge feature. ## Wire Admin API only, additive: issue kind `unknown_asin` in `/admin/issues`, `?issue=`, and the ignore endpoint. No migration, nothing the player reads. ## Tests and review - Go: the issue kind (listing, gating on the report, ignore allowed for an admin, 403 member, 401 anonymous), the userstate writers against the content generation on both engines. Console: the new surfaces, Add it URL building (encoding of `&`, `#`, `+`, `%`, `=`, non-ASCII, lone surrogates), certificate reasons per case, share in flight, jobs' last step. - Gate green: `scripts/build-admin.sh`, `go build/vet/test -race`, golangci-lint, native-engine vet/test/lint. - Review: /simplify + /code-review at the full level (high, Fable 5.2); copy fixes after live verification (gate only). ## Verified live (Playwright, real builds) - Overview + Books notice opens bulk match; Not found rows and the empty match dialog show the wording and Add it with the expected `q`; meta's `/add` page takes the prefill. - A real unknown-ASIN report run (through a local proxy so the made-up ASIN never reached meta) shows the Health state; ignoring it holds. - Certificate warning: self-signed at a name, TLS off at an https IP, none on plain http. - Typed-code invite wording on an iPhone viewport; failed and cancelled jobs' last step (seeded jobs, no Bridge). - Second Share press: with a stubbed share only; **a real phone run is still owed**. Pairs with #389 (independent) and KodeStar/audiosilo-docs#307.
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.
Documents v2.7.0 batch C on the server.
reset-adminwith the exact command per install type (our image, Unraid/linuxserver, Synology, Linux package, a terminal), its refusals and exit codes. The setup flow's nine steps, with Your account first and Connect a phone last, and the marketplace preselect.reset-adminbefore resetting the database.printed_password,metadata.region_chosen,PATCH /admin/usersusername,current_password_incorrect,username_required,unknown_asin, the/setup303), the first-run state, and the token cache's one-minute re-read.Reviewed at high (Opus) with every command, string and field fact-checked against the server branches.
npm run buildgreen.Pairs with KodeStar/audiosilo-server#389 and KodeStar/audiosilo-server#390.