[codex] Improve gig activity and historical status handling#302
Conversation
|
Warning Review limit reached
Your plan currently allows 1 review/hour. Refill in 12 minutes and 58 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (18)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR improves Discord gig “activity” and status/history handling end-to-end (Discord bot ingestion → persistence/querying → dashboard UI), reducing false “recent activity” signals from bot output and preventing stale reminders/notifications from triggering on very old/backfilled gigs.
Changes:
- Add a max-age bound for recruiting stale notifications/reminders and introduce
GIG_RECRUITING_REMINDER_MAX_AGE_DAYS. - Treat locked/archived gig threads as
OUTDATED(unless explicitly[FILLED]/[LOST]), and prevent candidate-match persistence from refreshing activity. - Hide historical terminal statuses (
LOST,OUTDATED) from the default gig list, with an opt-in “include historical” toggle for steering/admin users; also update dashboard timestamp formatting to include year and rebuild the bundled assets.
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/test_jobs.py | Adds coverage for locked/archived thread → OUTDATED mapping and reminder behavior (mark outdated without sending). |
| tests/unit/test_engagements.py | Adds query-shape tests for hiding historical statuses by default and applying max-age bounds for notifications/reminders. |
| tests/unit/test_backend_api.py | Updates/extends API tests for include_historical handling and reminder max-age settings passthrough. |
| packages/shared/src/five08/settings.py | Introduces gig_recruiting_reminder_max_age_days shared setting. |
| packages/shared/src/five08/engagements.py | Implements historical filtering/sorting for dashboard gigs; adds max-age filtering for notifications/reminders. |
| docs/discord-gig-dashboard.md | Documents new reminder max-age behavior and historical status visibility rules. |
| docs/configuration.md | Documents the new GIG_RECRUITING_REMINDER_MAX_AGE_DAYS environment variable. |
| apps/discord_bot/src/five08/discord_bot/cogs/jobs.py | Prevents candidate-match persistence from refreshing activity; marks locked/archived threads OUTDATED; passes max-age to reminder queries. |
| apps/api/src/five08/backend/static/dashboard/index.html | Updates asset references for rebuilt dashboard bundle. |
| apps/api/src/five08/backend/static/dashboard/assets/index-D2CiH-sJ.css | Rebuilt dashboard CSS bundle output. |
| apps/api/src/five08/backend/static/dashboard/.vite/manifest.json | Updates Vite manifest to match rebuilt dashboard bundle. |
| apps/api/src/five08/backend/api.py | Adds include_historical query param for gigs list and passes reminder max-age into notifications query. |
| apps/admin_dashboard/src/main.tsx | Adds “Include historical” toggle (steering/admin) and wires it into the gigs API request + refresh behavior. |
| apps/admin_dashboard/src/dashboard-utils.ts | Updates date formatting to include the year. |
| apps/admin_dashboard/src/dashboard-utils.test.ts | Adds test ensuring formatted timestamps include the year. |
| .env.example | Adds GIG_RECRUITING_REMINDER_MAX_AGE_DAYS example value. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Why
Old backfilled Discord gigs could look recently active because dashboard ingestion and bot posts refreshed activity. They could then trigger stale reminders even when the actual thread activity was old or the thread was already closed.
Validation