Skip to content

Remove optimistic invocation clones (codex) - #2556

Merged
numnx merged 1 commit into
feature/CODUX-168-pr-title-log-parsing-optimistic-invocationfrom
task/feature-codux-168-pr-title-log-parsing-optimisti-t02-codex-mraf9paw
Jul 7, 2026
Merged

Remove optimistic invocation clones (codex)#2556
numnx merged 1 commit into
feature/CODUX-168-pr-title-log-parsing-optimistic-invocationfrom
task/feature-codux-168-pr-title-log-parsing-optimisti-t02-codex-mraf9paw

Conversation

@numnx

@numnx numnx commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

🧩 Task: Remove optimistic invocation clones

Automated task PR opened by Code UX for T02.

📋 Summary

Sprint: Sprint 168 · PR Title, Log Parsing, Optimistic invocation · Task: T02

Implement SPR-168 by removing frontend optimistic invocation clones, ensuring live parsed provider logs are persisted for every invocation type, and adding a configurable task PR title template that uses real task titles and sprint tags.

🤖 Model & Provider

Provider Codex CLI
Model gpt-5.5

⏱️ Timing

Started 2026-07-07 09:05:48 UTC
Finished 2026-07-07 09:18:14 UTC
Duration 12m 27s

📊 Token Usage

Metric Value
Input tokens 349,716
Cached input tokens 2,376,832
Output tokens 15,923
Total tokens 2,742,471
Invocations 1
Tool calls 58
Active time 10m 49s

Included usage estimate (subscription/local login): $3.41

✅ QA Review

⏳ QA review runs after this PR is opened. Check the task card in the dashboard for the outcome once it lands.

📝 Full Task Prompt
## Objective
Delete the dashboard optimistic invocation clone flow so invocation rails show only records returned by the server while chat messages still send and refresh normally.

## Scope
- `dashboard/src/v2/hooks/use-invocation-pane-data.ts`
- `dashboard/src/v2/hooks/use-chat-page-data.ts`
- `dashboard/src/v2/hooks/use-chat-thread-data.ts`
- `dashboard/src/v2/components/chat/InvocationListCard.tsx`
- `tests/dashboard/invocations/invocation-optimistic-update.test.tsx`
- `tests/dashboard/v2/chat-message-bubbles.test.tsx`
- Relevant symbols: `optimisticInvocations`, `addOptimisticInvocation`, `clearOptimisticInvocation`, `reconcileOptimisticInvocation`, `onMessageSending`, `onMessageSent`, `onMessageSendFailed`

## Implementation Requirements
1. Remove `optimisticInvocations` state, optimistic id generation, merge filtering, reconciliation, and clear helpers from `useInvocationPaneData`; expose only server-backed invocation snapshots.
2. Remove chat-send callback plumbing that creates, reconciles, or clears optimistic invocations from `useChatPageData` and `useChatThreadData` while preserving message send, failure handling, cache updates, and thread refresh behavior.
3. Update active invocation polling to consider only real running invocations and remove `id.startsWith("optimistic:")` checks.
4. Remove optimistic-specific status rendering from `InvocationListCard`; status text should reflect the real invocation status provided by the server.
5. Delete or rewrite tests that assert optimistic invocation behavior, replacing them with focused tests that server snapshots render and running invocation polling still works without optimistic rows.

## Constraints
- Do not alter backend invocation APIs or record shapes.
- Do not remove ordinary optimistic chat message behavior unless it exists solely to support optimistic invocation rows.
- Keep selected invocation activation and cached message loading behavior intact for server ids.
- Avoid adding new polling intervals; use the existing refresh flow.

## Verification
- Run `pnpm run test:dashboard -- tests/dashboard/invocations/invocation-optimistic-update.test.tsx tests/dashboard/v2/chat-message-bubbles.test.tsx` after updating or removing obsolete tests.
- Run `pnpm run test:dashboard`.
- Success means no `optimistic:` invocation ids are generated by dashboard code and chat/invocation views still render server records correctly.
🌿 Branch Info

Base: feature/CODUX-168-pr-title-log-parsing-optimistic-invocation
Head: task/feature-codux-168-pr-title-log-parsing-optimisti-t02-codex-mraf9paw


🤖 Generated by Code UX

@numnx
numnx merged commit 06ed758 into feature/CODUX-168-pr-title-log-parsing-optimistic-invocation Jul 7, 2026
6 checks passed
@numnx
numnx deleted the task/feature-codux-168-pr-title-log-parsing-optimisti-t02-codex-mraf9paw branch July 7, 2026 09:22
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.

1 participant