Skip to content

feat: PieFed fake derives my_user in getSite + mark-all route#68

Merged
aeharding merged 1 commit into
mainfrom
test/piefed-fake-gaps
Jul 5, 2026
Merged

feat: PieFed fake derives my_user in getSite + mark-all route#68
aeharding merged 1 commit into
mainfrom
test/piefed-fake-gaps

Conversation

@aeharding

Copy link
Copy Markdown
Owner

Wave 1 of the provider-matrix follow-ups (~/threadiverse-plan.md).

  • PieFed getSite includes my_user when seed.loggedInAs — added typed myUserInfo/localUser builders (drift-checked against the OpenAPI schema), so logged-in boot works without a wire override. Retires the documented workaround in Voyager's e2e/matrix/fixtures.ts.
  • PieFed mark_all_as_read derived route, mutating seed read-state like the v1 fake — unblocks inbox mark-all in the matrix.
  • Cross-provider matrix tests: getSite.my_user (with client auth, since lemmyv1 gates it on auth while piefed reads it from the site response) and markAllAsRead.

Deferred from Wave 1: max_depth in derived comment lists. Making the "N more replies" test seed-based would couple the fake to Voyager's client-side defaultCommentDepth math and make it brittle — the honest wire-mock + canonical-payload assertion already there is the better tradeoff.

433 tests, typecheck, lint, build clean.

- FakePiefedInstance's derived GET /api/alpha/site now includes my_user
  when seed.loggedInAs (typed myUserInfo/localUser builders, drift-safe),
  retiring the wire-level workaround consumers needed for logged-in boot
- FakePiefedInstance derives POST /api/alpha/user/mark_all_as_read,
  mutating seed read-state like the v1 fake
- matrix tests cover both across providers (getSite my_user with auth;
  markAllAsRead clears unread)
@aeharding aeharding changed the title feat(testing): derive PieFed my_user in getSite + mark-all route feat: PieFed fake derives my_user in getSite + mark-all route Jul 5, 2026
@aeharding
aeharding force-pushed the test/piefed-fake-gaps branch from b8f1166 to 82d060a Compare July 5, 2026 23:35
@aeharding
aeharding merged commit d5b3f1a into main Jul 5, 2026
1 check passed
@aeharding
aeharding deleted the test/piefed-fake-gaps branch July 5, 2026 23:39
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