You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pulse in Huddle and on the Clock Page: the Video Posts Itself, and Clocks You In or Out - #659
All Copilot review threads are addressed (fixed or answered in-thread); the last fixes are in 798ea69. Tested by hand against a local backend (Huddle Pulse post with the draft name; Clock in with Pulse, then Clock out with Pulse, both landing on one post), plus typecheck, lint, format and unit tests. Destination-level backend tests for the clock kinds are a follow-up PR.
Summary
Stage 3 of landing #615 in pieces, on top of #654 and #658: Pulse where an update is posted. In Huddle, the one Pulse button from #658 sits beside the message box, after the composer's +, behind a "/": press it, record on your phone, and the video is posted to the team the moment it uploads, as its own post with the Pulse draft's name as its text. On the Clock page, a Pulse section opens the page: Clock in with Pulse posts the video as your plan and clocks you in; Clock out with Pulse adds it to your session's post as the wrap-up and clocks you out. Nothing typed goes with a Pulse video, and nothing is staged, held or kept on the page.
This is direct delivery, the same model as tickets, Redmine issues and clock sessions in #658 and PulseVault's examples/meteor-demo: the link carries the destination, the server delivers from onUploadComplete and replays if it must, the page only watches. The composers attach no Pulse video, on Huddle or on the Clock page, so there is no wait, no Cancel and nothing to lose on a reload. (An attach-to-composer version of this PR was built and reviewed first; it is in the history and was dropped for this.)
Screenshots
Taken on this branch against a local backend: real uploads over tus to the links the buttons reserved, with the draft name in Upload-Metadata, as the Pulse app sends it.
Huddle
Ticket, the composer's +, then / Pulse, and the placeholder saying so
Press Pulse on a computer: the hint says the video will post itself
The video lands: its own post, titled with the draft name, nothing typed went with it, and nothing beside the chip.
Clock page
The Pulse section opens the page: Record your plan, Clock in with Pulse
Press it: the hint says you'll be clocked in when it uploads
The plan video landed: clocked in, the section now offers Clock out with Pulse, and the wrap-up composer is seeded with the plan
After the wrap-up video: one Huddle post with the plan, a Wrap-up: line and both videos
Changes
huddle destination (pulse-destinations.js): check is team membership (requireTeamMember); deliver adds the video to the uploader's media library once (addToLibrary, shared with the library kind) and creates the post with createHuddlePost; delivered finds this uploader's post in this team by the video's URL, so a replay never posts twice. describeVideo carries the Pulse draft's name for the post text; the attachment title is unchanged. destination.teamId is in the Wormhole schema.
huddle.js: createHuddlePost(userId, …) and requireTeamMember are the huddle.createPost method's checks as plain functions, so the server-side caller makes the same ones. The method calls them after its identity and draft checks; its behaviour is unchanged.
Huddle page: PulseButton with { kind: 'huddle', teamId } after the composer's own +, behind a "/" — another way to post, not another attachment — keyed by team; onSettled refetches the feed in case the live subscription missed the post while the app was in the Pulse app. Placeholder: "Share an update, or post a Pulse…". ChatComposer renders its leading slot before the +, so Huddle.module.css lets the slot's children join the row (display: contents) and orders the Pulse group after the + (order: 1); that is visual order only, the keyboard still reaches Pulse before the +, as in feat(pulse): make Pulse the only way to add video, delivered where it was started #615. The composer's own Pulse attachment (PulseAttachButton, the staged videos, the pending flag and the per-team localStorage scope) is gone.
clock-plan and clock-wrapup destinations (pulse-destinations.js, from feat(pulse): make Pulse the only way to add video, delivered where it was started #615, on the check / delivered / deliver table): clock-plan checks team membership and the poster's calendar date, signs reservedAt into the token, and on delivery posts the video as the plan (postVideo) then clocks in (clockInWithPlan): a shift opened by hand meanwhile takes the plan instead of a second session; a shift opened and ended by hand since the link was made is not restarted. clock-wrapup checks the session is the uploader's own and, at reserve only, still open (check now takes a phase); on delivery it adds the video and a **Wrap-up:** <draft name> line to the session's post (appendWrapUp, which stamps wrapUpAt), then clocks out; a session ended by hand meanwhile still gets its wrap-up, and the note says so. Both are replay-safe across their two steps: delivered means the plan post linked to a session, or the wrap-up on a session that has ended, and deliver reuses a post it finds rather than writing a second, so a replay after a crash between the post and the clock change does only the missing step. A step after the post that fails (the clock-in itself) comes back in the outcome note — "Plan posted, but you weren't clocked in: …" — and the chip and modal show a done-note only when it differs from the plain landed label (followUpNote; the backend's notes and pulseStatus.ts's labels are the same strings on purpose).
clock.js: clockStart(userId, …) and clockStop(userId, …) are the clock.start / clock.stop methods as plain functions; the methods call them. huddle.js exports appendWrapUp and POST_DATE_RE. The reserve schema takes postDate and clockEventId. pulse-destinations.js loads clock.js lazily (clock → timesheet-change-requests → pulsevault would close a cycle).
Clock page (ClockPage.tsx, feat(pulse): make Pulse the only way to add video, delivered where it was started #615's UI): a Pulse section above the status card — the Pulse logo, "Record your plan" / "Record your wrap-up", and a Clock in with Pulse / Clock out with Pulse pill in the page's main-action style (PulseChip's new main variant, PulseLogo inverse on it, the --color-pulse token for the section's tint) — shown whether or not the team requires a plan. The page owns the two usePulseUpload hooks, so the modal outlives the pill swap when the clock changes, and a landed video clears the composer the way a hand-written post does. The post date and the wrap-up's session id are held still while a link is waiting (the hooks compare destinations by value), so midnight passing or a shift opened by hand can't drop the watch. No Pulse in the composer's Photo / Video / Doc / Ticket / @Mention row, and no Pulse gate on submit.
The chip says nothing beside itself when a video has landed, here and on the attachments panel: the post or attachment is the news and the modal already said it, so the row keeps its shape. Screen readers are still told. Kept, expired and error notes stay.
API: PulseDestination gains { kind: 'huddle'; teamId }, { kind: 'clock-plan'; teamId; postDate } and { kind: 'clock-wrapup'; clockEventId; postDate }; pulseStatus.ts gains their labels and hints.
Gone: PulseAttachButton.tsx and pulseComposerUpload.ts (a localStorage reservation per composer, restored on remount, polling media.list every 4 s).
Release note (1.0.6): "Pulse in Huddle" and "Clock in and out with Pulse" sections.
e2e: huddle/pulsevault-video.spec.ts gets the case from the first version of this PR: a link reserved for { kind: 'huddle', teamId } over REST, a tus upload with a draft name, the post found through huddle_getPosts with that text and then in the inbox; tickets/helpers.ts takes the union type.
Not in this PR: the composer's Video button and dropped or pasted video files (the raw-upload removal PR, where their e2e specs are rewritten); the timesheet walkthrough (timesheet-request, next PR); video cards (#616 rebuilt, later); e2e cases for the three new destinations (the huddle one is in pulsevault-video.spec.ts; the clock ones follow the same check → deliver path and were driven by hand, below).
Testing
Local, Vite on :3000 and Meteor on :3100 (dev database), at 3ee7944:
tsc --noEmit, ESLint and Prettier on every changed file, node --check on the four backend files: clean. vitest run src/features/pulse-upload src/features/huddle src/features/clock: 103/103.
Browser (Playwright): in the Huddle inbox the chip reads "Post a video with Pulse" and the placeholder "Share an update, or post a Pulse…"; pressed Pulse, the modal showed the QR with "It's posted to Huddle as soon as it uploads, with your draft's name as its text."; uploaded the e2e fixture over tus to the link the button reserved, with name in Upload-Metadata (create 201, PATCH 204; the token's context was { kind: 'huddle', teamId }); within seconds the post appeared in the thread as "Walkthrough of the new clock page" with the video attached (a[href="/pulsevault/artifacts/cbb6b25c-…"]), the modal had closed itself, and nothing was shown beside the chip (the landed line is sr-only).
Clock page (c71f1ea), browser + tus: the section read "Record your plan" with Clock in with Pulse; pressed it, the modal said "It's posted as your plan, and you're clocked in, as soon as it uploads."; the token's context was { kind: 'clock-plan', teamId, postDate, reservedAt }; uploaded the fixture with a draft name; within seconds the page was clocked in (timer running, "since 5:14 PM"), the section read "Record your wrap-up" with Clock out with Pulse, the wrap-up composer was seeded with the plan text, and the status route recorded { state: "done", note: "Plan posted — you're clocked in" }. Pressed Clock out with Pulse, uploaded again with a draft name: the page clocked out, Recent sessions showed the 1-minute session, the status route recorded "Wrap-up posted — you're clocked out", and in Huddle the session's one post read the plan text, "Wrap-up: ", with both videos attached. tsc, ESLint, Prettier, node --check on the backend files, vitest 103/103.
After Copilot's review of c71f1ea (afb199a): replay-safe two-step deliveries, the frozen date and session while a link waits, the e2e helper type. tsc, ESLint, Prettier, node --check, vitest (clock + pulse-upload 26/26) clean; the Clock page still renders its Pulse section after the hook change (browser).
After Copilot's review of afb199a (ef06fad):clockStop stops only the reserved session; clockStart decides reuse-or-create next to its insert; appendWrapUp matches both team-id forms; each hook on the Clock page freezes its own destination through its result modal. tsc, ESLint, Prettier, node --check, vitest 26/26 clean. A second full plan → wrap-up cycle in the browser against this head is below.
Checked by reading and tsc only: the replay branches themselves (a process killed between the post and the clock change), the composer clearing after a landed video (added after the run above), the follow-up note path (a clock-in that fails after the post), the "shift opened/ended by hand meanwhile" branches.
Not run: the Playwright suite (huddle/pulsevault-video.spec.ts needs the :3101 test backend; its huddle case passed in this PR's first version at c081c2b), a Redmine-target upload, an upload from the Pulse app on a phone.
Next
The timesheet walkthrough (timesheet-request destination, Pulse beside Pending approval), then the raw-upload removal, then video cards.
A `huddle` destination: the link carries the team, and when the video
lands the server adds it to the uploader's library and creates the post,
with the Pulse draft's name as its text. `createHuddlePost` and
`requireTeamMember` are the method's checks as plain functions, so the
server-side caller makes the same ones.
In the Huddle inbox the Pulse chip sits after the composer's own +,
behind a "/": nothing typed in the box goes with it, and nothing is
staged, cached or polled on the page. The composer no longer carries a
Pulse attachment of its own; the Clock page's composer keeps its attach
button until its own stage.
…w fixes
The Huddle delivery's "already delivered" lookup is scoped to the reserved
team and the uploader, as the ticket and session lookups are to their
place, so a post elsewhere carrying the same video isn't this delivery.
Every kind's `delivered` takes the uploader, one signature.
The e2e helper's destination is the real union, and the Huddle case sends
a draft name through the upload and expects it as the post's text.
…w fixes
Pulse sits after Ticket in the composer's leading slot in document order,
so it reads and tabs where it shows; the CSS that moved it past the + is
gone. The "/" uses the muted foreground token. The release note calls a
Pulse post a new way to put a video in Huddle, since the message box's +
still takes a video file in this stage.
Closing. This PR made the Huddle video post itself from the server with the draft name as its text. The intended behaviour is the other way round: the Pulse video attaches to the composer as a staged attachment, and the person types and sends the update. That needs no huddle destination kind and no server-side post, just #654's library destination and #658's hook settling into the composer. A new PR on top of #658 will do that for both the Huddle and Clock composers and remove the localStorage staging in PulseAttachButton.
release-notes/1.0.6.md takes main's note as is: this branch's Huddle section described the
video posting itself, which is not the behaviour this PR will ship.
…writing
The Huddle message box and the Clock page's plan and wrap-up composer use the one Pulse
button from #658, reserving a library video. When PulseVault reports it landed, it joins the
composer as an attachment chip and the person types and sends the post; nothing posts
itself. The hook hands its host the settled link so the composer knows which video it was.
Gone: PulseAttachButton and pulseComposerUpload.ts (a localStorage reservation per
composer, restored on remount, polling media.list every 4 s), the Clock page's pending-
reservation gate, and this branch's earlier huddle destination with its server-side post
and the huddle.js extraction, which are back to main.
The modal and chip take the composer's own words (attached to your post), and the Huddle
button remounts after a post or a removed video so its landed line clears.
…ttaches to the post
The half of the rework the previous commit was meant to carry: both composers render
PulseButton with the library destination, the hook hands its host the settled link, the
modal and chip take the composer's own words, the Huddle button remounts after a post or a
removed video, the Clock page loses its pending-reservation gate, and the 1.0.6 note gets its
composer section.
Removing the Pulse-pending guard lets a plan or wrap-up submit while the replacement PulseButton is still waiting. Submission changes composerMode, unmounting the keyed button before its onSettled callback can add the video, so the UI promise that it will attach to this post is false and the video remains only in the library. This also contradicts the PR's statement that Clock keeps the existing attach flow until stage 4; retain that flow or preserve the pending guard until server-side Clock destinations land.
Huddle prompt still uses the old placeholder
src/pages/Huddle.tsx:993
The PR explicitly changes the Huddle prompt to “Share an update, or post a Pulse…”, but this still renders the old placeholder, so the advertised entry point is not visible in the composer.
…he wrap-up, and the server clocks you in or out
The Clock page opens with a Pulse section (#615's): Record your plan with a 'Clock in with
Pulse' pill while clocked out, Record your wrap-up with 'Clock out with Pulse' while clocked
in, whether or not the team requires a plan. Two destinations carry it: clock-plan posts the
video to Huddle as the plan (draft name as text) and clocks in to that team; clock-wrapup adds
the video and a '**Wrap-up:** <name>' line to the session's post, stamps wrapUpAt and clocks
out. Both are idempotent on the video (a replay finds the post), and both follow the hand
flows: a shift opened by hand meanwhile takes the plan; a shift already ended isn't
restarted; a session ended by hand still gets its wrap-up; a step after the post that fails
(the clock-in itself) comes back in the outcome note, and the chip and modal show that note
only then. clockStart/clockStop are the clock.start/clock.stop methods as plain functions,
appendWrapUp joins createHuddlePost in huddle.js, the reserve schema takes postDate and
clockEventId, and the Pulse colour token backs the section. The page owns the two hooks so the
modal outlives the pill swap, and clears the composer when a video lands.
morepriyam
changed the title
Pulse Beside the Huddle Composer, and the Video Posts Itself
Pulse in Huddle and on the Clock Page: the Video Posts Itself, and Clocks You In or Out
Oct 7, 2026
… and a live link keeps its date and session
clock-plan and clock-wrapup are two steps, the post and the clock change, and 'delivered'
treated the post alone as the whole delivery: a process that died between the two would
have left the person unclocked (or still clocked in) with the replay saying done. Now
delivered means both — the plan post linked to a session, the wrap-up on a session that
ended — and deliver reuses the post it finds instead of writing a second, so a replay only
does the step that is missing.
On the page, the hooks compare destinations by value and drop a link whose destination
changed, so the post date and the wrap-up's session now hold still while a link is waiting:
midnight passing, or a newer shift opened by hand, no longer stops the watch on a video that
will still land where it said. The e2e helper's destination type takes the two new kinds.
Suppress backend notes except for new clock destinations
src/features/pulse-upload/pulseStatus.ts:42
This treats every backend note as user-facing follow-up text. Existing ticket/Redmine/clock deliveries return notes such as Attached to ticket <id>, which intentionally differ from the friendly landed labels, so this re-exposes raw IDs in the modal and beside the chip on phones. Only the two new clock action destinations use notes to report a failed follow-up; suppress notes for the other kinds.
clockStop takes the session to stop and stops it only while it is still open, so a wrap-up
that lands after the person ended that session by hand and started another doesn't end the
new one; the wrap-up delivery reads the session again after its write and branches on what
it finds. clockStart takes reuseOpen: a plan that lands while this team's shift is already
open joins that shift, decided next to the insert rather than in the destination (#642's
unique open-shift index closes the remaining window). appendWrapUp finds the session's post
by either form of the team id, as the feed does. On the page each link freezes its own
destination, through its result modal: a plan still uploading no longer keeps the wrap-up
from adopting a shift clocked in by hand, and a newer shift no longer clears a wrap-up's
result from under the person.
Limit follow-up note handling to multi-step clock destinations
src/features/pulse-upload/pulseStatus.ts:42
followUpNote now treats every backend note that differs from the UI label as a follow-up failure. Existing destinations intentionally return different notes—for example, ticket/Redmine/clock return Attached to ${kind} ${id}—so their modal and phone chip will regress to exposing raw IDs instead of the friendly “Added to this …” copy. Restrict follow-up notes to the two multi-step clock destinations.
Also fixed in 721d84e (from the last review's previously missed): followUpNote shows backend notes only for clock-plan / clock-wrapup, so ticket/Redmine/clock/library deliveries no longer surface raw notes like Attached to ticket <id>. Covered in pulseStatus.test.ts. Typecheck, lint, format and the pulse-upload/clock unit tests pass.
Prevent stale uploads from clearing newer composer generations
src/features/clock/ClockPage.tsx:318
The text-only guard still clears a newer composer generation when its text happens to match the old snapshot. A common case is starting Pulse with plan text X, posting that plan by hand, and leaving the newly seeded wrap-up as X; when the older Pulse upload settles, this equality succeeds and erases the wrap-up composer. Track the draft/composer generation owned by each link (and advance it on manual submission) in addition to comparing text, so an older link cannot clear a later plan or wrap-up.
Freeze plan team ID while upload result is pending
src/features/clock/ClockPage.tsx:330
The plan destination still follows gateTeamId live. If a user starts a plan upload for team A, closes the modal, and switches the selected team (or clocks into team B) before it lands, this value changes; usePulseUpload then discards team A's link/status and stops showing its result even though the server will still post and clock into A. Freeze the plan team ID for the lifetime of its waiting link/result modal, just as the date and wrap-up session are frozen.
Previously missed items from the 721d84e review, fixed in 798ea69:
Stale uploads clearing newer drafts (ClockPage.tsx:318): each link snapshots the draft text and a draft generation that advances on every hand-posted plan or wrap-up. A landed video clears the composer only if both still match, so a wrap-up seeded with the same text as an earlier plan is left alone.
Freeze plan team ID (ClockPage.tsx:330): the plan link's team is state now. It follows the gate team only while that link isn't waiting or showing its result, the same way the date and wrap-up session already do.
Checked: typecheck, lint, format and the pulse-upload/clock unit tests (28) pass.
Operational delivery failures are incorrectly marked successful
meteor-backend/server/pulse-destinations.js:174
Transient clock failures are converted into a successful delivery here. If MongoDB, the dynamic import, or another non-Meteor.Error operation fails after the post is written, deliverPulseVideo returns done and recordOutcome prevents PulseVault from replaying the missing clock-in/out step. Rethrow operational errors and only turn expected business-state errors into the user-facing follow-up note.
Shared post date can assign uploads to the wrong calendar day
src/features/clock/ClockPage.tsx:369
The date is shared across both independent links, so one pending upload can give a newly reserved upload the wrong calendar date. For example, a plan link started before midnight keeps planBusy true; after manually clocking in after midnight, a new wrap-up link still uses yesterday's postDate, which can place a recovery post in the wrong daily feed/gate. Freeze and refresh a separate post date for each Pulse hook, just as the team/session destinations are tracked independently.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status: ready to merge
All Copilot review threads are addressed (fixed or answered in-thread); the last fixes are in 798ea69. Tested by hand against a local backend (Huddle Pulse post with the draft name; Clock in with Pulse, then Clock out with Pulse, both landing on one post), plus typecheck, lint, format and unit tests. Destination-level backend tests for the clock kinds are a follow-up PR.
Summary
Stage 3 of landing #615 in pieces, on top of #654 and #658: Pulse where an update is posted. In Huddle, the one Pulse button from #658 sits beside the message box, after the composer's +, behind a "/": press it, record on your phone, and the video is posted to the team the moment it uploads, as its own post with the Pulse draft's name as its text. On the Clock page, a Pulse section opens the page: Clock in with Pulse posts the video as your plan and clocks you in; Clock out with Pulse adds it to your session's post as the wrap-up and clocks you out. Nothing typed goes with a Pulse video, and nothing is staged, held or kept on the page.
This is direct delivery, the same model as tickets, Redmine issues and clock sessions in #658 and PulseVault's
examples/meteor-demo: the link carries the destination, the server delivers fromonUploadCompleteand replays if it must, the page only watches. The composers attach no Pulse video, on Huddle or on the Clock page, so there is no wait, no Cancel and nothing to lose on a reload. (An attach-to-composer version of this PR was built and reviewed first; it is in the history and was dropped for this.)Screenshots
Taken on this branch against a local backend: real uploads over tus to the links the buttons reserved, with the draft name in
Upload-Metadata, as the Pulse app sends it.Huddle
The video lands: its own post, titled with the draft name, nothing typed went with it, and nothing beside the chip.
Clock page
Changes
huddledestination (pulse-destinations.js):checkis team membership (requireTeamMember);deliveradds the video to the uploader's media library once (addToLibrary, shared with thelibrarykind) and creates the post withcreateHuddlePost;deliveredfinds this uploader's post in this team by the video's URL, so a replay never posts twice.describeVideocarries the Pulse draft'snamefor the post text; the attachment title is unchanged.destination.teamIdis in the Wormhole schema.huddle.js:createHuddlePost(userId, …)andrequireTeamMemberare thehuddle.createPostmethod's checks as plain functions, so the server-side caller makes the same ones. The method calls them after its identity and draft checks; its behaviour is unchanged.PulseButtonwith{ kind: 'huddle', teamId }after the composer's own +, behind a "/" — another way to post, not another attachment — keyed by team;onSettledrefetches the feed in case the live subscription missed the post while the app was in the Pulse app. Placeholder: "Share an update, or post a Pulse…". ChatComposer renders its leading slot before the +, soHuddle.module.csslets the slot's children join the row (display: contents) and orders the Pulse group after the + (order: 1); that is visual order only, the keyboard still reaches Pulse before the +, as in feat(pulse): make Pulse the only way to add video, delivered where it was started #615. The composer's own Pulse attachment (PulseAttachButton, the staged videos, the pending flag and the per-team localStorage scope) is gone.clock-planandclock-wrapupdestinations (pulse-destinations.js, from feat(pulse): make Pulse the only way to add video, delivered where it was started #615, on thecheck/delivered/delivertable):clock-planchecks team membership and the poster's calendar date, signsreservedAtinto the token, and on delivery posts the video as the plan (postVideo) then clocks in (clockInWithPlan): a shift opened by hand meanwhile takes the plan instead of a second session; a shift opened and ended by hand since the link was made is not restarted.clock-wrapupchecks the session is the uploader's own and, at reserve only, still open (checknow takes aphase); on delivery it adds the video and a**Wrap-up:** <draft name>line to the session's post (appendWrapUp, which stampswrapUpAt), then clocks out; a session ended by hand meanwhile still gets its wrap-up, and the note says so. Both are replay-safe across their two steps:deliveredmeans the plan post linked to a session, or the wrap-up on a session that has ended, anddeliverreuses a post it finds rather than writing a second, so a replay after a crash between the post and the clock change does only the missing step. A step after the post that fails (the clock-in itself) comes back in the outcome note — "Plan posted, but you weren't clocked in: …" — and the chip and modal show a done-note only when it differs from the plain landed label (followUpNote; the backend's notes andpulseStatus.ts's labels are the same strings on purpose).clock.js:clockStart(userId, …)andclockStop(userId, …)are theclock.start/clock.stopmethods as plain functions; the methods call them.huddle.jsexportsappendWrapUpandPOST_DATE_RE. The reserve schema takespostDateandclockEventId.pulse-destinations.jsloadsclock.jslazily (clock → timesheet-change-requests → pulsevault would close a cycle).ClockPage.tsx, feat(pulse): make Pulse the only way to add video, delivered where it was started #615's UI): a Pulse section above the status card — the Pulse logo, "Record your plan" / "Record your wrap-up", and a Clock in with Pulse / Clock out with Pulse pill in the page's main-action style (PulseChip's newmainvariant,PulseLogo inverseon it, the--color-pulsetoken for the section's tint) — shown whether or not the team requires a plan. The page owns the twousePulseUploadhooks, so the modal outlives the pill swap when the clock changes, and a landed video clears the composer the way a hand-written post does. The post date and the wrap-up's session id are held still while a link is waiting (the hooks compare destinations by value), so midnight passing or a shift opened by hand can't drop the watch. No Pulse in the composer's Photo / Video / Doc / Ticket / @Mention row, and no Pulse gate on submit.PulseDestinationgains{ kind: 'huddle'; teamId },{ kind: 'clock-plan'; teamId; postDate }and{ kind: 'clock-wrapup'; clockEventId; postDate };pulseStatus.tsgains their labels and hints.PulseAttachButton.tsxandpulseComposerUpload.ts(a localStorage reservation per composer, restored on remount, pollingmedia.listevery 4 s).huddle/pulsevault-video.spec.tsgets the case from the first version of this PR: a link reserved for{ kind: 'huddle', teamId }over REST, a tus upload with a draft name, the post found throughhuddle_getPostswith that text and then in the inbox;tickets/helpers.tstakes the union type.Not in this PR: the composer's Video button and dropped or pasted video files (the raw-upload removal PR, where their e2e specs are rewritten); the timesheet walkthrough (
timesheet-request, next PR); video cards (#616 rebuilt, later); e2e cases for the three new destinations (the huddle one is inpulsevault-video.spec.ts; the clock ones follow the samecheck→deliverpath and were driven by hand, below).Testing
Local, Vite on :3000 and Meteor on :3100 (dev database), at 3ee7944:
tsc --noEmit, ESLint and Prettier on every changed file,node --checkon the four backend files: clean.vitest run src/features/pulse-upload src/features/huddle src/features/clock: 103/103.nameinUpload-Metadata(create 201, PATCH 204; the token's context was{ kind: 'huddle', teamId }); within seconds the post appeared in the thread as "Walkthrough of the new clock page" with the video attached (a[href="/pulsevault/artifacts/cbb6b25c-…"]), the modal had closed itself, and nothing was shown beside the chip (the landed line issr-only).{ kind: 'clock-plan', teamId, postDate, reservedAt }; uploaded the fixture with a draft name; within seconds the page was clocked in (timer running, "since 5:14 PM"), the section read "Record your wrap-up" with Clock out with Pulse, the wrap-up composer was seeded with the plan text, and the status route recorded{ state: "done", note: "Plan posted — you're clocked in" }. Pressed Clock out with Pulse, uploaded again with a draft name: the page clocked out, Recent sessions showed the 1-minute session, the status route recorded "Wrap-up posted — you're clocked out", and in Huddle the session's one post read the plan text, "Wrap-up: ", with both videos attached.tsc, ESLint, Prettier,node --checkon the backend files,vitest103/103.tsc, ESLint, Prettier,node --check,vitest(clock + pulse-upload 26/26) clean; the Clock page still renders its Pulse section after the hook change (browser).clockStopstops only the reserved session;clockStartdecides reuse-or-create next to its insert;appendWrapUpmatches both team-id forms; each hook on the Clock page freezes its own destination through its result modal.tsc, ESLint, Prettier,node --check,vitest26/26 clean. A second full plan → wrap-up cycle in the browser against this head is below.tsconly: the replay branches themselves (a process killed between the post and the clock change), the composer clearing after a landed video (added after the run above), the follow-up note path (a clock-in that fails after the post), the "shift opened/ended by hand meanwhile" branches.huddle/pulsevault-video.spec.tsneeds the :3101 test backend; its huddle case passed in this PR's first version at c081c2b), a Redmine-target upload, an upload from the Pulse app on a phone.Next
The timesheet walkthrough (
timesheet-requestdestination, Pulse beside Pending approval), then the raw-upload removal, then video cards.