Skip to content

A Pulse Walkthrough on a Pending Timesheet Change - #676

Merged
morepriyam merged 5 commits into
feat/pulse-huddlefrom
feat/pulse-timesheet
Oct 8, 2026
Merged

morepriyam merged 5 commits into
feat/pulse-huddlefrom
feat/pulse-timesheet

Conversation

@morepriyam

@morepriyam morepriyam commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Stage 4 of landing #615 in pieces, stacked on #659: a Pulse walkthrough on a timesheet change waiting for approval. Wherever a pending change shows, Pulse sits beside Pending approval. Record on your phone, and the server sets the video as the request's walkthrough the moment it uploads; the approver sees it in Timesheet Approvals, and the request then says Walkthrough added.

Same direct-delivery model as #654, #658 and #659: the link carries the destination, the server delivers from onUploadComplete, the page only watches. The walkthrough is added after the change is sent, not in the form, because the request is the destination and doesn't exist until it's submitted.

Screenshots

Taken on this branch against a local test backend. The upload went through the reserved timesheet-request link as the Pulse app sends it; the pending changes were created over the API.

A pending change: Pulse beside Pending approval Press Pulse on a computer: the QR code, and where the video goes
1-pending-with-pulse 2-pulse-qr-modal
Landed: the request says Walkthrough added The approver opens it and sees the walkthrough next to the explanation
3-walkthrough-added 4-approver-sees-walkthrough

Admin timesheet: an admin's edit to a member's shift is listed under Sent to another admin for approval, with Pulse, and stays there after a reload.

5-admin-sent-for-approval
Work page: a pending ticket-timer change, Pulse beside the menu (the row above already has its walkthrough) Work page: both landed, Walkthrough added
6-work-page-pending-with-pulse 7-work-page-walkthrough-added

Changes

  • timesheet-request destination (pulse-destinations.js, on the check / delivered / deliver table):
    • check: the request exists, is the uploader's own, is still pending, and has no walkthrough yet. Refusals are forbidden (someone else's) or not-found (gone, decided, or already has one), so a video that lands too late is kept in storage with the reason, not replayed forever.
    • delivered: the request already carries this video's URL.
    • deliver: one guarded update (status: 'pending', videoUrl empty), so a walkthrough never replaces another and never lands on a decided change. If the request moved on in between, it throws; the replay's check then keeps the video.
    • artifactIsEvidenceUnderReview already protects the video from deletion while the request is under review.
  • ChangeRequestWalkthrough (new, src/features/clock/): PulseButton for { kind: 'timesheet-request', id } on a pending request with no video; a success Badge "Walkthrough added" once it has one; nothing for a decided request. The UI follows feat(pulse): make Pulse the only way to add video, delivered where it was started #615.
  • Where it shows:
    • Personal timesheet: beside Pending approval in the session row (TimesheetRow's new pendingAction slot, on the session's first row only, so a session split by breaks or midnight gets one button), and in Awaiting approval next to Withdraw, in a ButtonGroup.
    • Admin timesheet: "Sent to another admin for approval" lists the admin's own pending changes for the sessions on screen, loaded from the server (listMine), so the walkthrough can still be added after a reload.
    • Work page: beside the menu on a ticket-timer entry with a pending change (same placement as feat(pulse): make Pulse the only way to add video, delivered where it was started #615, in a ButtonGroup); the actions column now sizes to its content so the chip and badge aren't cut off.
    • Timesheet Approvals: delivery flags the approvers' prompts for the request, so an open approvals view reloads the queue and the open request when the walkthrough lands.
  • Types and copy: PulseDestination gains timesheet-request (src/lib/api.ts, e2e helper); landed label "Walkthrough added — your approver will see it" and its upload hint in pulseStatus.ts. Backend notes stay hidden for this kind (only the clock kinds show follow-up notes).
  • Release note: a short section in 1.0.6.md.

Tests

  • New tests/e2e/timesheet/walkthrough.spec.ts:
    • member1 sends an edit on the shared team for approval, sees Pulse beside Pending approval, uploads through a reserved timesheet-request link, the request's videoUrl becomes the video, and after a reload the row says Walkthrough added.
    • A pending ticket-timer change shows Pulse on the Work page.
    • No link is handed out for someone else's request (forbidden) or for one no longer pending (not-found).
  • timesheet.spec.ts: Clock in / Clock out locators are exact, since the Clock page from Pulse in Huddle and on the Clock Page: the Video Posts Itself, and Clocks You In or Out #659 also has Clock in with Pulse / Clock out with Pulse.
  • Unit: pulseStatus.test.ts covers that this kind's backend note is never shown.
  • Run: typecheck, lint, format and the pulse-upload, clock and teams unit tests pass; against a local test stack (Mongo rs0 on :27017, Meteor on :3101), timesheet/walkthrough (3) and timesheet/timesheet: all passed.

Not in this PR

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

🗑️ Preview Environment Cleaned Up

The preview container for this PR has been deleted.

@morepriyam
morepriyam marked this pull request as ready for review October 7, 2026 23:24
Copilot AI balanced review requested due to automatic review settings October 7, 2026 23:24

Copilot AI 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.

🟡 Changes recommended

Pending walkthrough state is not reliably refreshed or recoverable in the admin and approver interfaces.

4 open findings
What changed in this PR

Adds Pulse walkthrough uploads to pending timesheet change requests, including guarded backend delivery and requester-facing controls.

Changes:

  • Adds the timesheet-request Pulse destination.
  • Shows Pulse controls and completion badges for pending changes.
  • Adds status copy, release notes, and end-to-end coverage.
File Description
meteor-backend/​server/​pulse-destinations.js Delivers walkthroughs to pending requests.
meteor-backend/​server/​main.js Documents the new destination schema.
src/​features/​clock/​ChangeRequestWalkthrough.tsx Adds the shared walkthrough control.
src/​features/​clock/​PersonalTimesheetPanel.tsx Displays walkthrough actions on personal requests.
src/​features/​clock/​TimesheetRow.tsx Adds a pending-status action slot.
src/​features/​teams/​AdminTimesheetPanel.tsx Offers walkthroughs after admin edits.
src/​features/​pulse-upload/​pulseStatus.ts Adds destination-specific Pulse copy.
src/​features/​pulse-upload/​pulseStatus.test.ts Tests backend-note suppression.
src/​lib/​api.ts Extends the destination type.
tests/​e2e/​tickets/​helpers.ts Extends the E2E destination type.
tests/​e2e/​timesheet/​walkthrough.spec.ts Tests delivery and reservation authorization.
tests/​e2e/​timesheet/​timesheet.spec.ts Disambiguates clock button locators.
release-notes/​1.0.6.md Documents the walkthrough feature.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread src/features/clock/TimesheetRow.tsx Resolved
Copilot AI balanced review requested due to automatic review settings October 7, 2026 23:47

Copilot AI 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.

🟡 Changes recommended

Delivery replay and admin-panel synchronization can leave walkthrough state stale or hidden.

2 open findings
4 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Medium severity Refresh pending requests after approval or rejection notifications

src/​features/​teams/​AdminTimesheetPanel.tsx:158

This loads the requester's pending list only on mount/team changes and local actions. If another admin approves or rejects the request while this panel stays mounted, myPending remains stale and continues showing “Walkthrough added” or an unusable Pulse button even though ChangeRequestWalkthrough should render nothing for decided requests. Subscribe to the same timesheet-change-approved / timesheet-change-rejected notifications used by PersonalTimesheetPanel and reload this list.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

… admin list ignores stale loads and drops decided changes
Copilot AI balanced review requested due to automatic review settings October 7, 2026 23:59
@morepriyam

Copy link
Copy Markdown
Collaborator Author

Previously missed item from the 0276a8f review, fixed in 8ebc655: the admin panel subscribes to the same timesheet-change-approved / timesheet-change-rejected notifications as PersonalTimesheetPanel and reloads its pending list, so a change another admin decides drops off instead of showing a stale Pulse button or badge. Typecheck, lint, format, unit tests and timesheet/walkthrough e2e (2 passed) on the local stack.

Copilot AI 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.

🔵 Needs a closer look

Timer-entry changes shown as pending in WorkPage still lack the promised Pulse walkthrough control.

0 open findings

2 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Medium severity Add walkthrough entry point for pending timer-entry changes

src/​features/​clock/​ChangeRequestWalkthrough.tsx:3

The new control is not actually shown everywhere a pending timesheet change appears. WorkPage.tsx:883-949 renders the same TimesheetChangeRequest workflow for timer-entry edits and shows a “Pending approval” badge, but it never renders ChangeRequestWalkthrough; those requests therefore have no Pulse entry point after submission. Wire the pending request (not just the boolean) into that row and refresh loadMyRequests from onAdded, consistent with the clock-timesheet row.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Copilot AI balanced review requested due to automatic review settings October 8, 2026 00:16

Copilot AI 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.

🔵 Needs a closer look

The core live refresh of an already-open approver view lacks end-to-end regression coverage.

0 open findings

Previously missed (1)

In code that hasn't changed since last review

Medium severity Add end-to-end coverage for approver live refresh on walkthrough changes

tests/​e2e/​timesheet/​walkthrough.spec.ts:131

This test covers delivery only from the requester's side; it never opens Timesheet Approvals as an approver or verifies that an already-open request refreshes when hasWalkthrough changes. That live-refresh path is new, spans the notification update and TimesheetApprovalsPanel, and has already required race/replay fixes, so an end-to-end assertion should keep it from silently regressing.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@SarkarShubhdeep

Copy link
Copy Markdown
Collaborator

I manually tried adding a pulse walkthrough video on time edit dialog but on pulse app got this error
image

@SarkarShubhdeep

Copy link
Copy Markdown
Collaborator

The "Couldn't reach that server..." issue got resolved after a new build release of Pulse app (56)
was able to add the video.

@SarkarShubhdeep SarkarShubhdeep left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Everything seems working, manually tested.
Approving.

@morepriyam
morepriyam merged commit fd196a1 into feat/pulse-huddle Oct 8, 2026
5 checks passed
priyamrmore pushed a commit that referenced this pull request Oct 30, 2026
…fork

vendor/ui now follows mieweb/ui's timehuddle/next integration branch:
main, the SuperChat host extension points, and the mobile-first media
work in mieweb/ui#675 and #676. The tarball is rebuilt from it (020e2193).
Each change goes to main as its own PR; as they merge, the branch shrinks
back toward main.
priyamrmore pushed a commit that referenced this pull request Oct 30, 2026
Picks up the Copilot round on mieweb/ui#675 and #676: autoplay and picture in picture handoffs, the speed button following the video, the focus trap's reachable ends, and the phone media view following the keyboard.
priyamrmore pushed a commit that referenced this pull request Oct 31, 2026
- A Pulse video plays in its card, on the library's MediaPlayer, whose
  controls now fit a card in a chat; an expand button opens the media view.
  The card has the bubble's corners everywhere, and never folds into a
  gallery.
- A post sending with files shows where it will land, dimmed, with how far
  its files have uploaded; Day grouping opens that day's thread. A failed send
  puts the text and the files back.
- A refused file says why: over 25 MB (post a longer video with Pulse), a type
  the box doesn't take, a HEIC photo. Word, Excel, text and CSV files can be
  attached, and documents show their size.
- Edit and Copy sit beside the message; the conversation list previews plain
  text, and a post with no text by what it carries.

Library from timehuddle/next ea28ebe5 (mieweb/ui #675, #676 and
feat/superchat-attachment-groups).
priyamrmore pushed a commit that referenced this pull request Oct 31, 2026
…ut of view

Closing a menu on any scroll that moved its trigger also closed one scrolled
a little to reach a lower item, which is what the org member-blocking and
realtime team-members e2e tests do. Library from timehuddle/next f94338f2
(mieweb/ui #676).
priyamrmore pushed a commit that referenced this pull request Nov 1, 2026
… edit

The vendored library takes the review round: readable file details, '+N'
in RTL, captions that show their state, Previous/Next clear of the actions
on a phone held sideways, and attachments that don't open while their
message is edited. SuperChat now hands a host card no open then, so a
Pulse card's ▶ is off until the edit is saved or cancelled.
priyamrmore pushed a commit that referenced this pull request Nov 1, 2026
Sends tracked per conversation, an edit that clears the text saves it
cleared, Escape back from the media view leaves a containing dialog open,
captions that follow the player's size, and a Play in picture in picture
that counts.
priyamrmore pushed a commit that referenced this pull request Nov 2, 2026
Tiles follow their picture's current shape, previews strip links whose
address holds parentheses, Remove keeps focus in the editor, and upload
progress stays out of the thread's live announcements.
priyamrmore added a commit that referenced this pull request Nov 5, 2026
@morepriyam
morepriyam deleted the feat/pulse-timesheet branch November 16, 2026 16:37
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.

3 participants