Skip to content

fix(events): restore frontend build after stale pending-action fixes - #452

Merged
chriswritescode-dev merged 1 commit into
mainfrom
fix/event-context-build-types
Oct 20, 2026
Merged

chriswritescode-dev merged 1 commit into
mainfrom
fix/event-context-build-types

Conversation

@chriswritescode-dev

@chriswritescode-dev chriswritescode-dev commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

#451 broke the frontend build (tsc -b) with three type errors in frontend/src/contexts/EventContext.tsx.

  • withoutMatchingItems inferred its item type from the prune predicate instead of the state record, so setPermissionsBySession / setFormsBySession rejected the result. The predicate parameter is now NoInfer<T>.
  • The pending-session scan over permissions and forms together left item implicitly any. The parameter is now annotated.

No behavior change.

Validation

  • pnpm build: passes
  • Frontend vitest run src/contexts src/pages/__tests__: 299 passed
  • pnpm lint:frontend: clean

Summary by CodeRabbit

  • Refactor
    • Improved internal type handling for event-related filtering callbacks.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: d7aebae0-45f9-4433-9402-38369a11152e
📥 Commits

Reviewing files that changed from the base of the PR and between 7cb28c0 and 63364ba.

📒 Files selected for processing: 1
  • frontend/src/contexts/EventContext.tsx

Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 2 remain after this review.

📝 Walkthrough

Two callback type annotations in EventContext.tsx now specify how TypeScript infers matching items and types pending-action server filters.

Changes: EventContext type annotations

Layer / File(s) Summary
Callback type annotations
frontend/src/contexts/EventContext.tsx
withoutMatchingItems uses NoInfer<T> for its removal predicate. The pending-action server filter item is explicitly typed with a serverId string.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 63364

The PR is mergeable with no identified behavioral or operational risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly describes the main change: restoring the frontend build after stale pending-action fixes.
Description check Passed The description gives a clear summary, explains the TypeScript fixes, states that behavior is unchanged, and reports build, test, and lint validation. It omits the template's Type of Change and Checkl…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description gives a clear summary, explains the TypeScript fixes, states that behavior is unchanged, and reports build, test, and lint validation. It omits the template's Type of Change and Checklist sections, but the core change and validation details are complete.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@chriswritescode-dev chriswritescode-dev added the ready-for-ci Trigger CI on a pull request label Oct 20, 2026
@chriswritescode-dev
chriswritescode-dev merged commit 052f2bb into main Oct 20, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-ci Trigger CI on a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant