Commit Graph

49 Commits

Author SHA1 Message Date
gpt-engineer-app[bot]
94312c8ef0 Connect to atomic rejection flow
Introduce atomic rejection for bulk submissions, remove dead moderation code, and clean exports:
- Replace direct DB updates in rejectSubmissionItems with atomic process-selective-rejection edge function call
- Add edge function invocation helper import
- Remove obsolete moderation actions (approvePhotoSubmission, rejectSubmissionItems, performModerationAction) and prune exports
- Update moderation index exports accordingly
- Ensure cascade handling uses atomic pipeline and avoid updateSubmissionStatusAfterRejection calls
2025-11-10 14:19:49 +00:00
gpt-engineer-app[bot]
34dbe2e262 Implement Phase 4: Transaction Resilience
This commit implements Phase 4 of the Sacred Pipeline, focusing on transaction resilience. It introduces:

- **Timeout Detection & Recovery**: New utilities in `src/lib/timeoutDetection.ts` to detect, categorize (minor, moderate, critical), and provide recovery strategies for timeouts across various sources (fetch, Supabase, edge functions, database). Includes a `withTimeout` wrapper.
- **Lock Auto-Release**: Implemented in `src/lib/moderation/lockAutoRelease.ts` to automatically release submission locks on error, timeout, abandonment, or inactivity. Includes mechanisms for unload events and inactivity monitoring.
- **Idempotency Key Lifecycle Management**: A new module `src/lib/idempotencyLifecycle.ts` to track idempotency keys through their states (pending, processing, completed, failed, expired) using IndexedDB. Includes automatic cleanup of expired keys.
- **Enhanced Idempotency Helpers**: Updated `src/lib/idempotencyHelpers.ts` to integrate with the new lifecycle management, providing functions to generate, register, validate, and update the status of idempotency keys.
- **Transaction Resilience Hook**: A new hook `src/hooks/useTransactionResilience.ts` that combines timeout handling, lock auto-release, and idempotency key management for robust transaction execution.
- **Submission Queue Integration**: Updated `src/hooks/useSubmissionQueue.ts` to leverage the new submission queue and idempotency lifecycle functionalities.
- **Documentation**: Added `PHASE4_TRANSACTION_RESILIENCE.md` detailing the implemented features and their usage.
2025-11-07 15:03:12 +00:00
gpt-engineer-app[bot]
bd2f9a5a9e Remove old approval flow
Implement the destructive migration plan to remove the old approval flow entirely. This includes deleting the legacy edge function, removing the toggle component, simplifying frontend code, and updating documentation.
2025-11-06 21:14:59 +00:00
gpt-engineer-app[bot]
406edc96df Implement 100% atomic transaction rollout
Update actions.ts and ApprovalTransactionToggle.tsx to default to the new atomic transaction RPC flow. The feature flag can now be used to disable the new flow for emergency rollback.
2025-11-06 20:48:18 +00:00
gpt-engineer-app[bot]
67525173cb Approve tool use
The user has approved the tool use.
2025-11-06 20:15:14 +00:00
gpt-engineer-app[bot]
a649906b61 feat: Complete app-wide error coverage 2025-11-04 19:58:20 +00:00
gpt-engineer-app[bot]
0df047d56b feat: Implement final error coverage 2025-11-04 19:50:06 +00:00
gpt-engineer-app[bot]
80aa033e70 Fix submission_items foreign keys 2025-11-04 14:57:58 +00:00
gpt-engineer-app[bot]
bf5dbc80b6 Fix: Update validation schema 2025-11-04 00:10:15 +00:00
gpt-engineer-app[bot]
d4b137c340 Fix: Update moderation validation schema 2025-11-04 00:04:33 +00:00
gpt-engineer-app[bot]
6af981a6e4 Fix imports and test flow 2025-11-03 22:03:08 +00:00
gpt-engineer-app[bot]
7eb0b77d76 Fix console statement violations 2025-11-03 18:30:07 +00:00
gpt-engineer-app[bot]
eee4b1c626 Fix moderation queue issues 2025-11-03 16:43:21 +00:00
gpt-engineer-app[bot]
c68b88de86 feat: Implement dynamic join solution 2025-11-03 16:20:28 +00:00
gpt-engineer-app[bot]
35c7c3e957 Refactor: Complete error handling overhaul 2025-11-02 23:19:46 +00:00
gpt-engineer-app[bot]
f3c898dfc1 feat: Implement all 7 phases 2025-11-02 21:00:22 +00:00
gpt-engineer-app[bot]
3e0c4db0a1 Refactor moderation queue query 2025-10-29 13:09:45 +00:00
gpt-engineer-app[bot]
7b6dfc4741 Fix moderation queue query 2025-10-29 13:00:33 +00:00
gpt-engineer-app[bot]
103a12f768 Start Phase 4: Cleanup & Polish 2025-10-21 17:32:50 +00:00
gpt-engineer-app[bot]
00ceea51c9 feat: Start Query Optimization Phase 2025-10-21 17:29:17 +00:00
gpt-engineer-app[bot]
81fccdc4d0 Fix remaining catch blocks 2025-10-21 17:08:24 +00:00
gpt-engineer-app[bot]
65a6ed1acb Fix: Type safety and unit validation 2025-10-21 15:05:50 +00:00
gpt-engineer-app[bot]
dcdb20386a Refactor: Implement state machine cleanup and fixes 2025-10-21 14:10:24 +00:00
gpt-engineer-app[bot]
14b3305755 Fix state machine issues 2025-10-21 14:01:50 +00:00
gpt-engineer-app[bot]
74860c6774 feat: Implement comprehensive request tracking and state management 2025-10-21 12:51:44 +00:00
gpt-engineer-app[bot]
1138eea024 Implement all phases sequentially 2025-10-21 12:18:38 +00:00
gpt-engineer-app[bot]
640fdb11db feat: Execute complete production readiness plan 2025-10-20 12:23:13 +00:00
gpt-engineer-app[bot]
026f402057 Refactor: Implement milestone moderation fixes 2025-10-17 17:21:21 +00:00
gpt-engineer-app[bot]
debb5325bd feat: Complete type safety for Phase 1 & 2 2025-10-17 15:23:15 +00:00
gpt-engineer-app[bot]
77deb62742 feat: Implement final type safety fixes 2025-10-17 15:06:35 +00:00
gpt-engineer-app[bot]
0db54b402b Refactor: Implement type safety plan 2025-10-17 14:35:15 +00:00
gpt-engineer-app[bot]
efc33a7dda Refactor: Complete type safety migration 2025-10-17 13:22:39 +00:00
gpt-engineer-app[bot]
ac3206625e Fix: Add type field to submissions 2025-10-15 14:31:21 +00:00
gpt-engineer-app[bot]
81a4b9ae31 feat: Implement Phase 3 optimizations 2025-10-15 12:19:37 +00:00
gpt-engineer-app[bot]
3e520e1520 feat: Implement Phase 5 optimization and best practices 2025-10-13 22:56:47 +00:00
gpt-engineer-app[bot]
0af5443c81 feat: Implement database-level sorting for moderation queue 2025-10-13 13:23:54 +00:00
gpt-engineer-app[bot]
90ae7d9a41 feat: Remove all sorting functionality 2025-10-13 13:15:14 +00:00
gpt-engineer-app[bot]
83e10817c5 Reverted to commit be92deec43 2025-10-13 13:06:29 +00:00
gpt-engineer-app[bot]
93f149f68c Reverted to commit 2661d65ab8 2025-10-13 13:06:02 +00:00
gpt-engineer-app[bot]
4fed307335 Reverted to commit de2d4a495f 2025-10-13 13:05:48 +00:00
gpt-engineer-app[bot]
f6891296d6 Fix: Implement comprehensive sorting fixes 2025-10-13 12:51:21 +00:00
gpt-engineer-app[bot]
284f778fc6 Fix: Implement sorting functionality 2025-10-13 12:29:01 +00:00
gpt-engineer-app[bot]
3ec26e23a3 Reverted to commit be92deec43 2025-10-13 12:17:13 +00:00
gpt-engineer-app[bot]
de2d4a495f Fix: Remove hardcoded sort from query builder 2025-10-13 01:46:14 +00:00
gpt-engineer-app[bot]
9cf969bb9d Fix: Remove all traces of username sorting 2025-10-13 01:32:43 +00:00
gpt-engineer-app[bot]
0d0e352a1e Implement Phase 6: Lock Management 2025-10-12 22:57:37 +00:00
gpt-engineer-app[bot]
7e6b99a68b feat: Implement useRealtimeSubscriptions hook 2025-10-12 22:43:54 +00:00
gpt-engineer-app[bot]
99a4d002ba feat: Extract moderation filter and sort logic 2025-10-12 22:38:30 +00:00
gpt-engineer-app[bot]
d979fa6e8b feat: Extract business logic for moderation 2025-10-12 20:37:53 +00:00