Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions client/src/components/ReviewForm.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@
min-width: 0;
max-width: 100%;
}
.review-form__comment-counter {
color: var(--muted);
font-size: 0.875rem;
margin: 0.4rem 0 0;
text-align: right;
}
.review-form__actions {
display: flex;
flex-wrap: wrap;
Expand Down
21 changes: 21 additions & 0 deletions client/src/components/ReviewForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,27 @@ it('requires an accessible 1 to 5 star choice before it saves', () => {
'maxlength',
'2000',
);
expect(screen.getByText('0 / 2,000 characters')).toBeInTheDocument();
expect(screen.getByRole('textbox')).toHaveAttribute(
'aria-describedby',
'review-comment-counter',
);
});

it('updates the character counter without announcing every keystroke', () => {
render(
<MockedProvider>
<ReviewForm albumId="1" review={null} onChanged={vi.fn()} />
</MockedProvider>,
);

fireEvent.change(screen.getByRole('textbox'), {
target: { value: 'A classic.' },
});

const counter = screen.getByText('10 / 2,000 characters');
expect(counter).toHaveAttribute('id', 'review-comment-counter');
expect(counter).not.toHaveAttribute('aria-live');
});

it.each([
Expand Down
5 changes: 5 additions & 0 deletions client/src/components/ReviewForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,12 @@ export default function ReviewForm({ albumId, review, onChanged }: Props) {
disabled={busy}
maxLength={MAX_COMMENT_LENGTH}
rows={4}
aria-describedby="review-comment-counter"
/>
<p id="review-comment-counter" className="review-form__comment-counter">
{comment.length.toLocaleString('en-US')} /{' '}
{MAX_COMMENT_LENGTH.toLocaleString('en-US')} characters
</p>
{error && <p role="alert">{error}</p>}
{status && (
<p ref={statusRef} role="status" aria-live="polite" tabIndex={-1}>
Expand Down
1 change: 1 addition & 0 deletions docs/AI-USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ the part that matters most.
| 2026-11-22 | evenkkl | Claude | #96, skip count and facet queries on Load more: Claude made the search aggregates lazy `AlbumConnection` field resolvers, added a `SearchAlbumsPage` query for Load more, kept page one's count and facets in the Apollo merge, and added server and client tests. Verified with lint, typecheck, the test suites and the PostgreSQL tests on PGlite. |
| 2026-11-22 | erikhfj | Antigravity | #117, stabilized `ReviewForm.test.tsx`: traced the intermittent CI failure (run `88055`) to `findByRole('status')` resolving via `MutationObserver` before React's passive `useEffect` focused `statusRef`, and wrapped the status focus assertions in `waitFor`. Verified with 10 consecutive test runs plus `pnpm format:check && pnpm lint && pnpm typecheck && pnpm test`. |
| 2026-11-22 | erikhfj | Antigravity | #107, documented the team's AI task delegation, verification, and review workflow in `docs/AI-USAGE.md`, reflecting actual practices across all four contributors and complementing #97's prompt-context section. Verified with `pnpm format:check && pnpm lint && pnpm typecheck && pnpm test`. |
| 2026-11-23 | robertky | Codex (ChatGPT) | #94: Added an accessible character count for review comments, linked it to the textarea without live announcements on every keystroke, and added component tests. Verified with `pnpm format:check`, `pnpm lint`, `pnpm typecheck`, `pnpm test`, and `pnpm build`. |
| 2026-11-23 | robertky | Codex (ChatGPT) | #104 review follow-up: combined the side drawer with the merged country preview, added backdrop dismissal and a keyboard focus loop, corrected the results-status test matcher and component documentation, and expanded the Playwright filter journey. Verified with `pnpm format:check`, `pnpm lint`, `pnpm typecheck`, `pnpm test`, `pnpm build`, and `pnpm test:e2e` against an isolated seeded PostgreSQL database. |

## Task delegation and verification workflow
Expand Down