Skip to content

FE: fix invisible tool runs and reconnect gaps in tickets/mingo chat#33

Merged
aliaska-varieva merged 1 commit into
mainfrom
hotfix/tickets-mingo-tool-execution-pairing
Jul 17, 2026
Merged

FE: fix invisible tool runs and reconnect gaps in tickets/mingo chat#33
aliaska-varieva merged 1 commit into
mainfrom
hotfix/tickets-mingo-tool-execution-pairing

Conversation

@pavlo-flamingo

Copy link
Copy Markdown
Contributor

Summary

  • Tool-execution pairing: id-less EXECUTED chunks now pair with the newest in-flight EXECUTING of the same (integratedToolType, toolFunction); matching scans newest-first so a stale interrupted card from an earlier turn can't swallow the current run (tickets ticket-details-store + mingo mingo-messages-store).
  • No more silently dropped chunks: updateToolExecutionInMessages returns whether anything matched, so callers append a fresh segment instead of dropping the event — fixes the invisible tool run after MESSAGE_END for approved commands. When no assistant bubble exists yet (cleared thread / history not hydrated), a fallback bubble is opened.
  • Compaction upsert fix: replace the last started compaction segment (mirrors the lib's upsertTrailingCompaction) — a second compaction landing in the same bubble is no longer dropped.
  • Reconnect gap recovery: TicketDialogSubscription surfaces NATS reconnects via onReconnected so the parent refetches persisted history (the CHAT_CHUNKS stream retains ~10 min; longer outages leave a gap JetStream replay can't fill).
  • Bump @flamingo-stack/openframe-frontend-core to ^0.0.448; refresh schema.graphql from introspection.

Notes

  • Текущие ошибки CI ожидаемо исправятся рибейзом main.

Test plan

  • Approved command in a ticket dialog: tool card appears and transitions EXECUTING → EXECUTED (both sides)
  • Interrupt a run, start a new same-tool run: the new card updates, the stale one stays interrupted
  • Two compactions in one assistant bubble both render completed
  • Drop NATS >10 min mid-dialog: history refetches on reconnect, no gap

@pavlo-flamingo
pavlo-flamingo requested a review from a team as a code owner July 17, 2026 22:20
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@pavlo-flamingo, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 49 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5ecb742d-840a-454b-beaa-37cab57dd6ea

📥 Commits

Reviewing files that changed from the base of the PR and between d4c623c and 6e293df.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (11)
  • package.json
  • schema.graphql
  • src/app/(app)/mingo/hooks/use-mingo-dialog-selection.ts
  • src/app/(app)/mingo/hooks/use-mingo-realtime-subscription.ts
  • src/app/(app)/mingo/stores/mingo-messages-store.ts
  • src/app/(app)/tickets/components/ticket-details-view.tsx
  • src/app/(app)/tickets/components/ticket-dialog-subscription.tsx
  • src/app/(app)/tickets/hooks/use-historical-messages.ts
  • src/app/(app)/tickets/hooks/use-side-chunk-processor.ts
  • src/app/(app)/tickets/hooks/use-ticket-messages.ts
  • src/app/(app)/tickets/stores/ticket-details-store.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotfix/tickets-mingo-tool-execution-pairing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- Pair id-less EXECUTED chunks with the newest in-flight EXECUTING of the
  same (integratedToolType, toolFunction); scan newest-first so stale
  interrupted cards from earlier turns don't swallow the current run
- updateToolExecutionInMessages now returns whether anything matched so
  callers append a fresh segment instead of silently dropping the event
  (the first post-MESSAGE_END EXECUTING chunk of an approved command)
- Open a fallback assistant bubble when no assistant message exists yet
  instead of dropping segments; fix compaction upsert to replace the last
  'started' segment (mirrors the lib's upsertTrailingCompaction)
- Surface NATS reconnects from TicketDialogSubscription so the parent can
  refetch persisted history (CHAT_CHUNKS stream retains ~10 min)
- Bump @flamingo-stack/openframe-frontend-core to ^0.0.448; refresh
  schema.graphql
@pavlo-flamingo
pavlo-flamingo force-pushed the hotfix/tickets-mingo-tool-execution-pairing branch from df224e6 to 6e293df Compare July 17, 2026 22:24
@pavlo-flamingo
pavlo-flamingo enabled auto-merge (squash) July 17, 2026 22:25
@aliaska-varieva
aliaska-varieva disabled auto-merge July 17, 2026 22:43
@aliaska-varieva
aliaska-varieva merged commit 2158c1e into main Jul 17, 2026
3 checks passed
@aliaska-varieva
aliaska-varieva deleted the hotfix/tickets-mingo-tool-execution-pairing branch July 17, 2026 22:43
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.

2 participants