Skip to content

[DISC-007] Add availability and timezone overlap - #65

Merged
chev0004 merged 10 commits into
developfrom
feat/disc-007
Jun 20, 2026
Merged

[DISC-007] Add availability and timezone overlap#65
chev0004 merged 10 commits into
developfrom
feat/disc-007

Conversation

@chev0004

Copy link
Copy Markdown
Owner

Outline

Summary

DISC-007 makes profile availability a first-class discovery signal: it persists each member's weekly availability window, computes timezone-aware overlap against the signed-in viewer, and surfaces it across the feed and profile editor.


Changes & Enhancements

  • Type of Change:
    • Feature
    • Bugfix
    • Refactor
    • Chore
  • Changes:
    • (overlap engine):
      • Add a pure module that maps availability windows into UTC week intervals and reports overlap minutes, meaningful overlap, and available-now state.
      • Share DST-aware timezone offset and time parsing helpers from the availability constants.
    • (data model):
      • Persist structured availability (days, from, to, any-time) and a hide-availability flag alongside the legacy coarse preset, with a back-compatible migration.
      • Read the structured window in discovery and the profile editor, falling back to the preset for older rows.
    • (discovery):
      • Add "Available now" and "Overlaps with me" filters plus a "Most overlap" sort, persisted in the URL.
      • Thread the viewer's timezone and availability into the feed and show an overlap or available-now badge with viewer-local times on each card.
    • (profile):
      • Add a privacy toggle to hide exact availability from the public profile.

Page / App Changes

Affected Next.js Routes (Local):

  • /[lang]
  • /[lang]/profile
Before (Screenshot)
After (Screenshot)

Component / Storybook Changes

Affected Storybook Components (Local):

Before (Screenshot)
After (Screenshot)

Not Doing


Other (Remarks)

Includes an additive, back-compatible migration (0004_availability_overlap.sql); deploy needs bun run db:migrate.


Checklists

  • Code is well-documented (comments, JSDoc, etc.).
  • Existing comments were updated as needed.
  • No out-of-scope changes are included.
  • Write TODO comments where future work is required.
  • Removed unnecessary debug code (e.g., console.log, debugger).
  • Self-reviewed and tested locally.

@chev0004 chev0004 self-assigned this Jun 20, 2026
@chev0004
chev0004 merged commit 529acb0 into develop Jun 20, 2026
1 check 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