Skip to content

feat: weekly time overwrites#242

Merged
cirex-web merged 4 commits intomainfrom
staging
Jan 29, 2026
Merged

feat: weekly time overwrites#242
cirex-web merged 4 commits intomainfrom
staging

Conversation

@cirex-web
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings January 29, 2026 00:39
@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

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.

❤️ Share

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

@github-actions
Copy link

github-actions bot commented Jan 29, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 82.91% 466 / 562
🔵 Statements 82.09% 486 / 592
🔵 Functions 81.04% 124 / 153
🔵 Branches 72.49% 253 / 349
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/db/dbQueryUtils.ts 80% 93.75% 73.33% 81.81% 147-150, 167-170, 187-198
src/db/getLocations.ts 100% 100% 100% 100%
src/db/schema.ts 64.7% 100% 36.84% 64.7% 32, 56, 72, 90, 103, 120, 153, 177-183, 208-211
src/db/updateLocation.ts 96.55% 75% 100% 96.55% 133
Generated in workflow #416 for commit d218df3 by the Vitest Coverage Report Action

@railway-app railway-app bot temporarily deployed to CMU Eats / staging January 29, 2026 00:42 Inactive
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for “weekly time overwrites” so locations can have recurring per-weekday time overrides, with point-in-time overrides taking precedence.

Changes:

  • Adds a weekly_time_overwrites_table (schema + migrations) and an addWeeklyTimeOverride upsert helper.
  • Extends location fetch logic to load/apply both point and weekly time overrides (with precedence rules).
  • Adds/updates database tests covering weekly overrides and DST edge cases.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/database.test.ts Adds coverage for weekly overrides + precedence over point overrides; adds an extra DST edge-case test.
src/db/updateLocation.ts Adds addWeeklyTimeOverride() DB upsert function.
src/db/schema.ts Defines weeklyTimeOverwritesTable with PK + weekday check constraint.
src/db/getLocations.ts Applies weekly overrides (and point overrides) when constructing returned time intervals.
src/db/dbQueryUtils.ts Fetches weekly overrides alongside existing point overrides.
drizzle/meta/_journal.json Records new drizzle migrations.
drizzle/meta/0008_snapshot.json Snapshot includes weekly overwrites table (pre-PK).
drizzle/meta/0009_snapshot.json Snapshot includes weekly overwrites table with composite PK.
drizzle/0008_ordinary_rage.sql Migration creating weekly overwrites table + unique index.
drizzle/0009_cooing_snowbird.sql Migration converting unique index to composite primary key.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cirex-web cirex-web merged commit ef384bb into main Jan 29, 2026
8 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.

1 participant