Skip to content

Conversation

robertky
Copy link
Member

What changed

  • Separate review publish/update/delete mutation failures from album refresh failures.
  • Confirm the review change succeeded even when refreshing album details fails.
  • Add a refresh-only retry action so users do not resubmit or delete the review again.
  • Add component tests for publish, update and delete when the refresh fails, including retry behavior.
  • Record AI-assisted work in docs/AI-USAGE.md.

Verification

  • pnpm format:check
  • pnpm lint
  • pnpm typecheck
  • pnpm test (client: 213 passed; server: 86 passed, 56 PostgreSQL-backed tests skipped because no TEST_DATABASE_URL is configured locally)
  • pnpm build

Closes #122.

@robertky robertky requested a review from a team as a code owner November 23, 2026 12:35
Copy link
Member

@erikhfj erikhfj left a comment

Choose a reason for hiding this comment

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

Good separation of mutation errors vs. album refresh errors and clean refresh-only retry UI. One bug to fix before merge:

  • In client/src/components/ReviewForm.tsx, the Submit and Delete buttons are marked aria-disabled={busy || Boolean(refreshError) || ...}, but submit() (line 42) and remove() (line 67) do not check refreshError. Because aria-disabled does not block HTML form submission or button onClick, clicking Submit/Delete (or activating them via keyboard) while refreshError is shown still fires saveReview or deleteReview a second time.
  • Fix: guard both submit() (if (mutationInFlight.current || unchanged || refreshError) return;) and remove() (if (!review || mutationInFlight.current || refreshError) return;), and add a quick assertion in ReviewForm.test.tsx verifying that clicking Submit/Delete while refreshError is displayed does not re-invoke the mutation.

Copy link
Member

@erikhfj erikhfj left a comment

Choose a reason for hiding this comment

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

Merged main (resolving ReviewForm.css and docs/AI-USAGE.md conflicts after #120/#124), added the refreshError guard in submit() and remove() with regression assertions in ReviewForm.test.tsx, and verified with pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build. Approving!

@erikhfj erikhfj merged commit b29e56e into main Nov 23, 2026
3 checks passed
@erikhfj erikhfj deleted the fix/122-review-refresh-status branch November 23, 2026 20:24
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Distinguish review save success from album refresh failure
2 participants