Skip to content

Fix Showcase audit consistency and review replay checks - #1252

Merged
tannerlinsley merged 2 commits into
mainfrom
taren/showcase-rollout-fixes
Sep 11, 2026
Merged

tannerlinsley merged 2 commits into
mainfrom
taren/showcase-rollout-fixes

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

Keeps Showcase moderation audit records consistent with saved decisions and locks rows while moderation and featuring updates run. Batch review replay now requires a matching saved audit snapshot, so later edits are rejected without breaking idempotent reruns. The batch audit payload is stored as a JSON object.

Also aligns gallery loader query keys and search validation, and makes the optional browser test portable with reliable cleanup.

Validation: 503 tests passed, TypeScript and lint passed. An isolated PostgreSQL fixture verified preview without writes, transaction rollback, apply, idempotent replay, stale-edit rejection, and pending-to-private handling.

Summary by CodeRabbit

  • Bug Fixes

    • Improved showcase moderation and featured-status updates to prevent conflicting changes during simultaneous requests.
    • Corrected audit records so they accurately reflect the resulting featured status.
    • Improved detection of repeated review actions to avoid applying the same update more than once.
  • Enhancements

    • Added validation and maximum lengths for community project and showcase filters, search text, and pagination inputs.
    • Showcase listings now consistently display content assigned to the showcase placement.

@tannerlinsley
tannerlinsley requested a review from a team September 11, 2026 19:09
@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 74596404-094f-4ce4-81f8-611082e62d18

📥 Commits

Reviewing files that changed from the base of the PR and between ef1852a and e9efdff.

📒 Files selected for processing (5)
  • scripts/apply-showcase-review.ts
  • src/routes/community-projects.tsx
  • src/routes/showcase/index.tsx
  • src/utils/showcase.functions.ts
  • tests/showcase-publication.integration.test.ts

📝 Walkthrough

Walkthrough

The changes improve showcase migration replay detection, bound route search inputs, serialize showcase updates transactionally, record effective audit state, and make publication integration tests configurable and cleanup-safe.

Changes

Showcase consistency and validation

Layer / File(s) Summary
Review migration replay checks
scripts/apply-showcase-review.ts
Capability comparisons cast stored values through text. Matching rows use timestamps or migration audit snapshots to detect replays. Audit payloads are explicitly cast to jsonb.
Search parameter and placement filters
src/routes/community-projects.tsx, src/routes/showcase/index.tsx
Routes use shared validation schemas with bounds for library IDs, use cases, and query text. Showcase queries filter by placement: 'showcase'.
Transactional showcase updates and audit state
src/utils/showcase.functions.ts
Moderation and featuring operations lock rows inside transactions. Administrative updates reuse the computed featured state in the update and audit record.
Publication integration test runtime
tests/showcase-publication.integration.test.ts
The test uses a configured browser path, normalized URL origins, temporary screenshot paths, guarded diagnostics, and nested cleanup handling.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Suggested reviewers: ladybluenotes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch taren/showcase-rollout-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tannerlinsley
tannerlinsley merged commit f2f65d1 into main Sep 11, 2026
6 of 7 checks passed
@tannerlinsley
tannerlinsley deleted the taren/showcase-rollout-fixes branch September 11, 2026 19:13
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