Skip to content

feat: attendance cleanup rules show last run, preview and run summary - #270

Merged
buzz-code merged 1 commit into
mainfrom
claude/attendance-cleanup-visibility
Nov 15, 2026
Merged

buzz-code merged 1 commit into
mainfrom
claude/attendance-cleanup-visibility

Conversation

@buzz-code

Copy link
Copy Markdown
Owner

Requested by הדסה · project thread

Summary

Users couldn't see what attendance cleanup did: "run now" returned only a job id, and job results are admin-only.

  • Last run on the rule: the sweep stores lastRunAt + lastRunSummary (deleted count, skipped dates and reason) on each rule via update() (skips the entity's key-resolution hook). New columns + migration; shown in the rules list.
  • Preview (dry run): new preview bulk action lists, per date, the students whose att_reports would be deleted, without deleting.
  • Run now: runs synchronously through the same runCleanupRules and shows the per-rule summary in a dialog instead of enqueuing a job.
  • Sweep logic extracted to runCleanupRules(dataSource, userId, rules, dryRun); the weekly job handler uses it unchanged.
  • Roadmap entry added.

Tests

Handler + config specs updated (19 pass locally): last-run update, dry run lists students and neither deletes nor saves, run-now/preview call through per owner.

Part of buzz-code/ops#67


Generated by Claude Code

- Sweep stores each rule's last run (time + deleted count + skipped dates).
- New "preview" bulk action: dry run listing students whose attendance
  would be deleted, per date, without deleting.
- "Run now" runs synchronously and shows the per-rule summary in a dialog
  instead of a job id.

Part of buzz-code/ops#67

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GTictXCqjcaSDit3Kb14A
@buzz-code
buzz-code force-pushed the claude/attendance-cleanup-visibility branch from 2d9bfeb to 621bddb Compare November 15, 2026 20:22
@buzz-code
buzz-code merged commit 4efdf5d into main Nov 15, 2026
4 checks passed
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.

2 participants