Skip to content

fix(onboarding): harmonize Done-page AI Fun Facts notice copy (ISSUE-001)#152

Merged
engels74 merged 1 commit into
mainfrom
fix/dogfood-2026-06-18-issue-001-002
Jun 18, 2026
Merged

fix(onboarding): harmonize Done-page AI Fun Facts notice copy (ISSUE-001)#152
engels74 merged 1 commit into
mainfrom
fix/dogfood-2026-06-18-issue-001-002

Conversation

@engels74

Copy link
Copy Markdown
Owner

Summary

Remediates the two Low-severity findings from the 2026-06-18 E2E dogfood run.

ISSUE-001 — Done-page AI Fun Facts notice inconsistency (fixed)

The onboarding Done page presented a self-contradictory AI status: the notice banner read "AI Fun Facts is enabled but no OpenAI key was provided" while the configuration summary card simultaneously labeled the same state "Template mode".

Root cause is copy inconsistency, not a form-serialization defect. The Configure toggle is a <button type="button"> that contributes no form field of its own; the value is posted via formData.set plus a hidden input, and the schema's z.enum(['true','false']).transform means a correct toggle-off cannot post true. The notice is also already reconciled against the saved key state through _deriveAiKeyMissingNotice (ISSUE-010), so the URL param cannot go stale. The reported toggle-off symptom was a stale-snapshot automation artifact; the genuine, reproducible problem was the wording.

Changes:

  • Reframe the Done-page banner to the "built-in templates will be used because no OpenAI key was provided" wording so it is consistent with the summary card's "Template mode" label. The Admin -> Settings -> AI link is preserved.
  • Export the summary helper as _deriveFunFactsSummary. The _ prefix is required by the +page.server.ts route-export guard and matches the sibling _deriveAiKeyMissingNotice convention. Behavior is unchanged; only visibility changed to make it unit-testable.
  • Extend tests/unit/onboarding/complete-notice.test.ts with a _deriveFunFactsSummary branch test pinning all three states: key present -> frequency label; no key + ai-key-missing -> "Template mode - add an OpenAI key to enable AI"; otherwise -> "Disabled". The existing _deriveAiKeyMissingNotice tests are unchanged.

No database, schema, access-control, or form rewrite. settings/+page.* is unchanged.

ISSUE-002 — Anonymous "Server Members Only" denial (won't-fix by design)

Resolved as working-as-designed. The uniform 404 returned to anonymous visitors of a private-oauth personal Wrapped link is deliberate anti-enumeration behavior: the same minimal body is returned for nonexistent ids, revoked tokens, and members-only resources, so there is no oracle. This was previously deliberated and locked by a contract test (ISSUE-009 / DF-04 / DF-018) that explicitly forbids a members-only "sign in" prompt firing for real member ids alone.

The dogfood recommendation to redirect anonymous users to /auth/plex is rejected: a redirect would occur only when the resource exists and is private-oauth, while a nonexistent id returns 404 - redirect-vs-404 is itself a direct enumeration oracle. No source or test change; WRAPPED_NOT_FOUND_MESSAGE, both wrapped routes, and the sharing test literals/contract are byte-identical to main.

Verification

  • bun run check - 0 errors / 0 warnings
  • bun run check:biome - clean
  • bun run test - 2154 pass / 0 fail, coverage gate green; the sharing suite (256 tests) passes unchanged, confirming anonymous-denial byte-identity is preserved
  • New _deriveFunFactsSummary branch test passes (bun test -t "FunFactsSummary" -> 3 pass)

Notes

  • ISSUE-002 has no code change in this PR; the dogfood report follow-up (gitignored) records the won't-fix-by-design rationale.

…001)

The onboarding Done page showed a contradictory AI status: the notice
banner claimed "AI Fun Facts is enabled" while the configuration summary
labeled the same state "Template mode". The reported toggle-off symptom is
not a form-serialization defect (the toggle is a <button type="button">;
formData.set plus the hidden input plus the z.enum transform mean a correct
toggle-off cannot post true, and the notice is already reconciled from the
saved key state via _deriveAiKeyMissingNotice). The real, reproducible issue
was copy inconsistency.

- Reframe the Done-page banner to the "built-in templates will be used
  because no OpenAI key was provided" wording so it matches the summary
  card's "Template mode" label; preserve the Admin -> Settings -> AI link.
- Export the summary helper as _deriveFunFactsSummary (the `_` prefix is
  required by the +page.server.ts route-export guard and matches the
  sibling _deriveAiKeyMissingNotice convention); behavior is unchanged.
- Extend tests/unit/onboarding/complete-notice.test.ts with a
  _deriveFunFactsSummary branch test pinning all three states
  (key -> frequency; no key + ai-key-missing -> Template mode; else
  -> Disabled).

ISSUE-002 (anonymous "Server Members Only" denial) is resolved
won't-fix-by-design: the uniform 404 is deliberate anti-enumeration
behavior (ISSUE-009 / DF-04 / DF-018) and the suggested redirect to
/auth/plex is rejected as an enumeration oracle. No source or test change.
@augmentcode

augmentcode Bot commented Jun 18, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Harmonizes the onboarding Done-page messaging for AI Fun Facts when no OpenAI key is configured.

Changes:

  • Updates the Done-page notice banner copy to consistently describe “template mode” behavior (built-in templates when no key is present).
  • Exports the summary helper as _deriveFunFactsSummary (underscore-prefixed to satisfy route export constraints) so it can be unit-tested.
  • Adds unit tests covering the three expected summary states: key present (frequency label), no key + notice (Template mode), and no key + no notice (Disabled).

Technical Notes: No settings schema, persistence, or access-control behavior changes; this is primarily a copy/visibility + test coverage update.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@engels74
engels74 merged commit dfc1814 into main Jun 18, 2026
3 checks passed
@engels74
engels74 deleted the fix/dogfood-2026-06-18-issue-001-002 branch June 18, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant