Skip to content

✨ Inbox: ● Record in the dashboard - #18422

Merged
hivecommons-hive[bot] merged 2 commits into
v5from
feat/inbox-recording-ui
Nov 16, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
v5from
feat/inbox-recording-ui

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Second of the "record a meeting directly in hive" PRs (backend: #18408). This adds the dashboard recorder, microphone only, and turns inbox.recording.enabled on by default. Tab audio and auto-transcription follow in their own PRs.

What it adds

  • ● Record in the Inbox header, and ● Record into Inbox in Inception (spek). Hidden unless inbox.recording.enabled, the viewer is owner or read-write, and the browser has MediaRecorder + getUserMedia.
  • Consent before every recording: a modal with the notice, a title field and an acknowledgement checkbox. Start stays disabled until it is ticked; nothing remembers the acknowledgement. The notice version (2026-11-v1) is sent with the start request and stored with the user (backend). If transcription is off on this hive, the notice says the recording will not be transcribed until an owner enables it.
  • Red ● Recording indicator fixed on screen for the whole recording (any section), linking back to the recorder.
  • Recorder panel: title, timer, mic level meter (AnalyserNode into a <meter>), Pause/Resume, Stop and save, Discard, and the upload status ("All chunks saved on the hive" vs "N chunks waiting to upload", plus retry countdown and Retry now).
  • Chunked upload: MediaRecorder.start(10000), audioBitsPerSecond 32000, WebM/Opus or MP4 (Safari); pieces over max_chunk_bytes are split. Every chunk is written to an IndexedDB queue first and removed only on a 2xx; network errors, 408/429/5xx retry with backoff (2 s doubling to 30 s); a 409 with expected_seq past the chunk means the hive already has it (lost ack); other refusals stop the upload with the reason. After a reload, queued chunks upload and the recording is finalized. A Web Lock keeps another tab from finalizing a recording that is still live.
  • Wake Lock while recording, a hidden-tab warning ("keep this screen open" on phones), and an ended-track handler that finishes the recording when iOS stops the microphone.
  • A 409 "already recording" offers Finish the earlier recording.
  • Inbox items from hive-recording show who recorded them, their own pending text, and audio expired (kept N days) with no play control after retention.
  • CSP: no change needed (no blob: preview; playback is same-origin from the hive). Permissions-Policy already has microphone=(self) for the dashboard document.
  • Uses existing tokens only (--red, --surface, --sp-*, ...); no inline styles.
  • Docs: src/docs/inbox-recording.md default updated.

Tests

JS node (inbox_recorder.test.js, sandboxed from static/index.html with injected helpers): recorder state machine with a fake MediaRecorder and getUserMedia (chunks in order, pause excluded from duration, finalize, mic released), consent required every time and never stored, consent text, queue resume after a simulated network failure with backoff, lost-ack 409, fatal refusal, reload resume, live-lock skip, mic refusal and refused start, discard, panel, role and browser support matrix. Go: flag default.

🤖 Generated with Claude Code

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#18424 ✨ meetings: Betty drafts issues, RFCs, Spek sessions and knowledge notes for approval (Betty F) same files src/pkg/dashboard/static/index.html
#18415 ✨ Inbox: pills record where an item was shared, by whom and when same files src/pkg/dashboard/static-src/css/inbox.css
src/pkg/dashboard/static-src/js/inbox.js
src/pkg/dashboard/static/index.html
#18419 ⚠️ Retire the inception API, watcher and brainstorm inception mode same files src/pkg/dashboard/static/index.html

@hivecommons-hive

hivecommons-hive Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Why:

  • the review swarm returned requires_human: it has a question for you, not a fix for the hive
  • the reviewer asked you: clubanderson should decide whether microphone recording ships enabled by default on every hive, given that recording laws vary by jurisdiction.

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.

Evidence bundle `#184223777dee` sha256:e4844365c1297aae48e804ed2418b6efd9a8a5bbb8378dd7def62d6b1dcf27af — download from the dashboard or `hivectl review evidence #18422`.

Record a meeting or note from the microphone straight into the Inbox:
consent notice before every recording, red ● Recording indicator for the
whole session, timer, level meter, Pause/Resume/Stop and upload status.
MediaRecorder chunks every 10 s at 32 kbit/s go to an IndexedDB queue and
leave it only on a 2xx, so a network drop or reload resumes the upload.
Wake Lock and a hidden-tab warning; a shortcut in Inception. Hidden for
read users. inbox.recording.enabled now defaults to true.

Signed-off-by: Andy Anderson <andy@clubanderson.com>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Decision needed: @clubanderson should decide whether microphone recording ships enabled by default on every hive, given that recording laws vary by jurisdiction.

One decision needed: inbox.recording.enabled flips from false to true (src/pkg/config/inbox_recording.go:15, src/docs/inbox-recording.md:57), so every existing hive gets a ● Record control for owner and read-write users on upgrade, with no operator opt-in.

What I read: the default flip and its test change (src/pkg/inbox/recordings_test.go), plus the recorder state-machine tests, which cover consent being required on every start, never stored, and Start disabled until the box is ticked. The PR body states default-on as intentional, so I am not questioning the choice. The open point is that it turns on audio capture of people, which is a legal/privacy risk class. That is a maintainer's call, not a code defect.

If default-on is intended, no change is needed from me. I did not exhaustively review the roughly 1,300 lines of recorder JS in static-src/js/inbox-recorder.js, so this is not a full code approval.

— hive: agent=reviewer backend=claude model=claude-sonnet-5-5 claude=2.1.325

@clubanderson clubanderson added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 16, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 16, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@clubanderson clubanderson added the lgtm Indicates that a PR is ready to be merged. label Nov 16, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit a7bcce8 into v5 Nov 16, 2026
86 of 89 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/inbox-recording-ui branch November 16, 2026 15:27
@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 3777dee.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant