Repository navigation
✨ meetings: Calendar section, scheduled joins and approvals (Betty C1) - #18399
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
736b2e0
ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. hive/awaiting-ci: rebased onto v5 (resolved sections.js help text and regenerated static/index.html from the manifest); CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325 Evidence bundle `#18399b40c9e5` sha256:96da945680ed4fa19c0ad54403bc888c07a05d5a07481aee7f18dc3d8a43fd44 — download from the dashboard or `hivectl review evidence #18399`. |
New pkg/meetings/schedule: the Event model shared with the email phase, schedule.json in the meetings data dir (atomic writes, keyed by UID + RECURRENCE-ID, SEQUENCE rule, CANCEL marks cancelled), and a scheduler that joins through Manager.Join a lead time before start (env HIVE_MEETINGS_SCHEDULE_TICK_S / _LEAD_S), expands RRULEs with teambition/rrule-go in the event's zone, supports skip-one-occurrence, claims each occurrence before joining so a restart never joins twice, and links the created meeting back. Ingest(Event) with an Approver seam (C1 stub: owner manual adds approved, everything else awaits approval). Dashboard: /api/meetings/schedule list/add and approve, decline, cancel, skip routes; a Calendar section right after Inbox with a sidebar badge (live meetings plus pending approvals); a top-bar indicator while hive is in a meeting, driven by /api/events meeting frames. openapi.json, api-reference, meetings.md, dashboard-sections.md and env-vars.md. Part of #18391. Fixes #18394 Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
…time.Sleep Signed-off-by: Andy Anderson <andy@clubanderson.com>
01caa22 to
cd9ade9
Compare
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at b40c9e5. |
Mutation testinggremlins found 53 surviving mutant(s) in changed files: the code ran under tests, but changing it did not fail any test.
30 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the
Verdict: |
Betty phase C1 (part of #18391): scheduled meetings, the Calendar section and approvals. No email yet; the email phase (C2) calls the same
IngestAPI.What changes
pkg/meetings/schedule(new)Event: uid, recurrence_id, sequence, method, summary (200 runes max), organizer, attendees, start/end (UTC), tzid, rrule, exdates, next occurrences, join_url, platform (google_meet, teams, zoom, discord), native meeting id, passcode, guild/channel, source (email, manual, discord), status (scheduled, awaiting_approval, live, ended, cancelled, declined, failed, blocked, skipped), the meeting id once joined, per-occurrence history, timestamps.Store:<meetings.data_dir>/schedule.json, rewritten atomically, keyed by UID + RECURRENCE-ID. A higher SEQUENCE replaces the entry; an equal or lower one is ignored (ErrStaleSequence). CANCEL marks the event cancelled. Cancelling a series also cancels its overrides, and cancelling one occurrence that has no override adds an EXDATE.Scheduler:HIVE_MEETINGS_SCHEDULE_TICK_S) and joins 60 s before start (HIVE_MEETINGS_SCHEDULE_LEAD_S) throughManager.Join, passing the inviter;github.com/teambition/rrule-go(MIT, added to go.mod and NOTICE) in the event's zone, so local time holds across DST, and allows only daily, weekly, monthly or yearly rules;Manager.Subscribeplus a reconcile pass;Ingest(Event) (Event, error)with anApproverinterface. The C1 stubOwnerApproverapproves the owner's own manual adds; everything else awaits approval.API (
api_meetings_schedule.go):GET /api/meetings/schedule: owner or read-write; returns{upcoming, recent, attendee_name}.POST /api/meetings/schedule: owner or read-write manual add. A read-write user's add awaits approval.POST /api/meetings/schedule/{eid}/{approve|decline|cancel|skip}: owner only.GET /api/meetings/scheduleis a literal, so it takes precedence over/api/meetings/{id}. The action routes have four segments, so they never collide with the/api/meetings/{id}/...routes. The passcode is never returned. openapi.json and the api-reference rows are added, and citations were re-anchored withcheck-docs-citations.py --fix.Dashboard:
calendar.html,calendar.js,calendar.css, manifest, sidebar,sections.jstitle and help). Each row shows title, organizer, start and end in the viewer's time zone (Intl), platform badge, next occurrence, source and status. Rows have Approve and Decline for meetings awaiting approval, Skip and Cancel, and Open live panel or Notes. An "Add meeting" form takes a link, start, end, title and repeat./api/eventsmeeting frames over an initialGET /api/meetings. The name comes from the bot display name ("Betty Bee from the hive" shows as "Betty Bee"; the default "hive (notes)" shows as "Hive").static/index.htmlis regenerated by byte-identical manifest concatenation.Docs:
meetings.md(Calendar),dashboard-sections.md,env-vars.md. Changelog fragment added.Tests
🤖 Generated with Claude Code