Repository navigation
feat(mate): offer the Heartbeat on the goal card as one checkbox - #26003
Conversation
A crewmate's crewmate.goal card now carries a Heartbeat checkbox, checked by default, while the mate's Heartbeat is off and was never declined. Checked, the card sets the goal and then turns the Heartbeat on at the mate's interval through the same hooked schedules route a crewmate.check_ins card writes; its Undo turns it off before taking the goal back. Unchecked, only the goal is written and the decline is remembered (the record's heartbeat_offer), so no later goal card offers it again. The goal-setup turn no longer asks about the Heartbeat in chat or proposes a second set_check_ins card after a goal card.
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns: the Heartbeat step goes through the existing hooked schedules route with compare-and-set, and old stored cards still rebuild. Notes
[DESIGN-REVIEWED] b73cf0d Description read[DESCRIPTION-READ] dcb0725ee2d2c85442c8cc8bdad3fb41bde047d2e1d34cd36dc3bdc5abd0c9ba That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ human override accepted@buluoray overrode this lane for |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the applied (locked) goal card with its Heartbeat checkbox. After the user presses "Set goal", this card is their only record of whether the Heartbeat was turned on, and no screenshot shows it. Evidence gaps
Notes
[UX-REVIEWED] b73cf0d Description read[DESCRIPTION-READ] 5a3eb0e09d27cde9410dad9df10548e9dbd2db0f36982165a1387ad245048a83 That sha256 names everything this verdict read: the PR description, plus the 8 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
3701491 to
aba3e60
Compare
aba3e60 to
eaab6f1
Compare
|
/ai-review override first-principles eaab6f1 product-shape: Owner decision by @buluoray: the Heartbeat offer on the goal card is checked by default, deliberately overriding the RFC's off-by-default. A person who sets a goal usually wants it kept moving, and accepting the card is an explicit consent with the box in plain view. The cost stays visible: the box states the cadence and that each run spends credits and can be turned off any time. Unchecking is remembered, so the offer is never repeated. |
|
AI-review override not recorded: |
eaab6f1 to
3e2880f
Compare
|
/ai-review override first-principles 3e2880f product-shape: Owner decision by @buluoray: the Heartbeat offer on the goal card is checked by default, deliberately overriding the RFC's off-by-default. A person who sets a goal usually wants it kept moving, and accepting the card is an explicit consent with the box in plain view. The cost stays visible: the box states the cadence and that each run spends credits and can be turned off any time. Unchecking is remembered, so the offer is never repeated. |
|
AI-review override not recorded: |
On a goal card's Undo steps only, a schedules write whose changes already hold succeeds without writing, so turning the Heartbeat off by hand no longer stops the Undo before it takes the goal back. Apply keeps the 409, so a Heartbeat the user turned on by hand is never claimed by the card. Also label the checkbox for jsx-a11y, drop the unused heartbeat_offer_open helper, and replace the one-entry legacy editable registry with a goal-kind case in rebuild_record.
3e2880f to
b73cf0d
Compare
|
/ai-review override first-principles b73cf0d product-shape: Owner decision by @buluoray: the Heartbeat offer on the goal card is checked by default, deliberately overriding the RFC's off-by-default. A person who sets a goal usually wants it kept moving, and accepting the card is an explicit consent with the box in plain view. The cost stays visible: the box states the cadence and that each run spends credits and can be turned off any time. Unchecking is remembered, so the offer is never repeated. |
|
AI-review override not recorded: |
|
/ai-review override first-principles b73cf0d owner-decision: @buluoray decided the goal card's Heartbeat box is checked by default, overriding the RFC's off-by-default: #26003 (comment) . The box states the cadence and that runs spend credits; unchecking is remembered. |
Human judgment recorded@buluoray recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
chenmingwei23
left a comment
There was a problem hiding this comment.
Approved: checks green, mergeable.
Problem / Motivation
Goal: Setting a crewmate's goal and turning on its Heartbeat becomes one decision, made on the goal card itself.
Today a mate proposes a goal on a
crewmate.goalcard. After the user applies it, the goal-setup turn (goal_setup.kickoff_heartbeat_tools) makes the mate ask in chat whether it should keep track of the goal on its own, and on yes it proposes a second card (set_check_inswith the Heartbeat on). The user answers the same question twice, on two surfaces, and the Heartbeat (the thing that makes the mate work between chats) is easy to miss.Why it matters
The Heartbeat is what turns a goal into work the mate moves forward while the user is away. Asking about it in a separate chat turn and a second card adds a round trip at the moment the user is most engaged, and a user who skims past the chat question ends up with a goal nothing works on.
Not a goal
set_check_insor the Schedules tab's Heartbeat row. They stay the way to change the Heartbeat later.crewmate.createcard or on a goal saved from the Goals tab. A Goals-tab save still gets the existing one-time chat question.What changed (motivation → approach → change)
Goal → put the Heartbeat choice where the goal is confirmed → reuse the existing governed write path rather than adding one.
change_card_catalog_kinds.py):crewmate.goalgains an optional, editableheartbeatboolean (default true).change_card_catalog_plans.py): while the snapshot reads the Heartbeat off and never declined, the card carries aheartbeat_offerrow (after,interval,per_day). Checked, the apply plan is the goal write, then the samePUT /api/members/{slug}/goals/schedulesstep acrewmate.check_inscard makes (heartbeat: true,expected: {heartbeat: false, interval}). That route is already inHOOKED_ROUTES, so the Heartbeat turns on through the same card hook, owner check and compare-and-set asset_check_ins; no new write path. Unchecked, only the goal is written. Either way the goal write carriesheartbeat_offer: accepted|declined.member_goals.py): a newheartbeat_offerfield, stored in the same write as the goal. On a goal card's Undo steps only (held_is_done), a schedules write whose changes already hold succeeds without writing; Apply keeps the 409. The goal route (handlers/member_goals.py) validates and passes it through.change_card_catalog.py,change_cards_readers.py): a card that turned the Heartbeat on undoes in two steps, Heartbeat off first (expected: {heartbeat: true}), then the goal. If the user turned the Heartbeat off by hand since, that step succeeds as a no-op and the goal Undo still runs.resumed_undo_is_staleadmits the second step because the goal write is itself a compare-and-set.after_shows_the_writerequires the Heartbeat to still read on. The Heartbeat state is left out of the goal card'scomparable_state, since its own step is a compare-and-set and a switch flipped later must not block the goal's Undo.goal_setup.py,crewmate_prompts.json): withheartbeat_offerset (written with the goal, so the nudge sees it even before the Heartbeat step lands) or the Heartbeat on, the turn asks nothing about it. Thekickoff_heartbeat_toolstext now says it applies to a goal saved on the Goals tab.set_goal's tool description and the mate identity prompt say the goal card carries the choice and not to ask again or proposeset_check_insfor it.website/src/cards/kindBodies.tsx,cardRegistry.ts,ChangeCard.tsx):GoalBodydraws the row as a checkbox, "Keep this moving on its own (Heartbeat)", with the note "Runs about every {interval}. Each run uses credits, and you can turn it off any time." The interval is formatted in the active locale. Toggling re-previews the card withheartbeat, so the plan the gateway runs is the one the box shows. The row is kept out of the change lines. Two new catalog keys in all 12 languages.editablelist, the resumed-Undo rule) in the same commit.No decision in
docs/decisions/covers the Heartbeat offer; the one Heartbeat decision (2026-10-22, the switch lives on the Schedules tab) is unchanged.Backwards compatibility
Compatible: a goal card stored before this change has no
heartbeatin its snapshot, so it offers no checkbox and rebuilds to the same plan;rebuild_recordaccepts its oldeditablelist (["long_term"]) for the goal kind, so its history and Undo survive. A goal record withoutheartbeat_offerreads as unanswered. Owner routes accept the same bodies as before;heartbeat_offeris optional.Removes nothing: the change adds an optional param, a record field and a card step; no route, key, validator path or capability is removed, and
set_check_insis unchanged.Tests
test/test_member_goals_heartbeat_card.py(new): checked card sets the goal and turns the Heartbeat on (one heartbeat cron), then Undo turns it off and removes the goal; Undo still removes the goal after the Heartbeat was turned off by hand, while outside Undo the same write stays a conflict; a Heartbeat turned on by hand between preview and Apply makes the card's step 409 and its Undo leaves that Heartbeat on (both fail if the no-op is not limited to Undo); unchecked sets only the goal, records the decline, and a later card offers nothing; no checkbox when the Heartbeat is already on; the row names the mate's own interval;heartbeatis editable and validated; a pre-checkbox stored card still rebuilds; an answered checkbox stops the goal-setup chat question; the goal route refuses an unknown answer; the record keeps only known answers.test/test_member_goals_cards.py: the scrubbing test pinsheartbeat: falseso it keeps checking only the goal write.website/src/cards/GoalBody.test.tsx(new): the box renders checked by default with the cadence and credit note; it names the mate's interval; toggling calls preview withheartbeatflipped both ways; no box without an offer; locked on a finished card; the row stays out of the change lines; throughChangeCard, toggling sendsheartbeat: falsetocardsApi.preview.Proof: not provable -- other: new feature, the new tests exercise new behaviour rather than a reverted fix
Manual verification
Rendered the real
ChangeCardfrom the isolated capture entrywebsite/capture/goal-heartbeat-card.html(scriptwebsite/scripts/capture-goal-heartbeat-card.mjs) in dark and light, checked, unchecked, no-offer and Chinese. Not exercised end to end against a live mate; the apply and Undo paths run through the real card middleware and routes in the backend tests.Screenshots / video
Checked (the default), dark:
Light, unchecked, no checkbox (Heartbeat already on), Chinese
Related Issues
N/A — requested directly by the owner.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.