Skip to content

feat(api): add attendance and repeat check-in helpers - #9

Merged
VidurShah merged 2 commits into
mainfrom
feat/check-in-helpers
Oct 22, 2026
Merged

VidurShah merged 2 commits into
mainfrom
feat/check-in-helpers

Conversation

@HarshaMatta

@HarshaMatta HarshaMatta commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Ticket

Closes #5

What changed

I added two functions:

  • didAttend checks if someone checked in after a meeting started and before midnight Eastern time.
  • mergeCheckIns combines two check-ins, keeping the latest information without losing previous attendance.

I also added 25 tests covering normal check-ins, midnight, daylight saving time, invalid dates, and repeat check-ins.

How to verify

All tests and checks passed locally:

  • 26 API tests passed
  • 28 total tests passed
  • TypeScript, lint, formatting, and build checks passed

Checklist

  • Tests and checks passed
  • TDD updated
  • No private information included

@VidurShah

Copy link
Copy Markdown
Collaborator

Nice work Harsha. The rule is correct: at or after the start, on the same Eastern calendar day, using Intl with America/New_York and no hard-coded offset. The tests cover every case in the ticket, and then some, including the repeated 1 AM hour on Nov 1.

One small note: mergeCheckIns trusts the caller to pass the newer submission as incoming and doesn't compare timestamps. That's fine for the write path, so I pushed a doc comment saying so (65aa9ae) instead of changing behavior.

Good to merge.

@VidurShah
VidurShah force-pushed the feat/check-in-helpers branch from c016bc5 to ce0b431 Compare October 22, 2026 04:37
@VidurShah
VidurShah merged commit 0b2d4be into main Oct 22, 2026
1 check passed
@VidurShah VidurShah mentioned this pull request Oct 22, 2026
9 tasks
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.

Interest meeting attendance rule

2 participants