Skip to content

Generated with Hive: Add recoverable failed state to ProposalCard and unblock approval response#4263

Open
tomsmith8 wants to merge 17 commits into
masterfrom
bugfix/CMQ8CBW52000RKZ04O78B4UOR-proposalcard-recoverable-failed-state-1781170547
Open

Generated with Hive: Add recoverable failed state to ProposalCard and unblock approval response#4263
tomsmith8 wants to merge 17 commits into
masterfrom
bugfix/CMQ8CBW52000RKZ04O78B4UOR-proposalcard-recoverable-failed-state-1781170547

Conversation

@tomsmith8

Copy link
Copy Markdown
Collaborator

No description provided.

@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hive Ignored Ignored Jun 12, 2026 4:25pm

@tomsmith8 tomsmith8 added the user label Jun 11, 2026 — with Hive Chat PM
tomsmith8 and others added 16 commits June 11, 2026 09:36
…RKZ04O78B4UOR-proposalcard-recoverable-failed-state-1781170547
Make the org-canvas chat survive the browser closing mid-stream. The
server is now the single writer for org-canvas turns: it persists the
user message synchronously and the assistant turn in `after()` (driven
to completion off the client socket via `consumeStream()`), then fires a
Pusher nudge. The browser stream becomes a live preview — full
character-by-character streaming is preserved.

- New `services/canvas-turn-persistence.ts`: shared `messagesFromSteps` +
  row-locked, prefix-idempotent `appendTurnMessages` (+ nudge). Both the
  user turn and the auto-turn write through it; auto-turn refactored to
  call it (behavior unchanged).
- `/api/ask/quick`: org-canvas turns (gated on orgId + turnId) create/append
  the user row before streaming, return `X-Conversation-Id`, and persist
  the assistant rows under `${turnId}-a*` in `after()`. Approvals persist
  their click + result row too. `maxDuration = 300`.
- Client: `useSendCanvasChatMessage` generates a `turnId`, sends it, and
  adopts the returned conversation id. `useCanvasChatAutoSave` drops the
  POST/PUT save path and becomes live-sync-only, filtering the tab's own
  turns out of the merge by `${turnId}-` prefix (no flicker, no dup).
- `mergeServerMessages` gains an authored-prefix filter;
  `canvasChatStore` gains `locallyAuthoredTurnIds` + `markTurnAuthored`;
  pusher gains the `user-turn` reason.

Tests: new canvas-turn-persistence suite; rewrote useCanvasChatAutoSave
for the live-sync-only contract; extended mergeServerMessages cases.

Plan: docs/plans/backend-driven-canvas-turns.md
…ll (#4276)

The org-canvas SubAgentRunCard gated the Start Tasks button on an
artifact signal (source.hasTasks, set only for a TASKS artifact), so
tasks the planner creates directly over MCP (create_task /
create_feature_task) never surfaced the button. Separately, the card's
status pill read a frozen workflowStatus snapshot taken at fan-out time,
so the terminal status written seconds later by the stakwork webhook
left it stuck on 'Running'.

Start Tasks: drive the button off the live ready-count (which is
artifact-independent) instead of the artifact flag. Render the slot for
any answered planner run and revalidate it on new planner activity
(revalidateKey) and window focus.

Status pill: on a terminal feature workflowStatus, patch the latest
planner row's source.workflowStatus in place (syncPlannerWorkflowStatusToCanvas)
and fire a 'workflow-status' nudge. The append-only live-sync merge
can't refresh an existing row, so add a pure reconcilePlannerSources
step that swaps refreshed planner source from the server without
dropping/reordering local rows (no-message-loss invariant intact).

Tests: add reconcilePlannerSources unit cases.
@github-actions

Copy link
Copy Markdown

Test environment is now live.

View it at: https://hive-preview-4.sphinx.chat

Database expires at: Jun 12, 2026, 9:27 PM UTC

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants