Skip to content

Fix story preview bugs, and bugs of data Resolution for query ids - #1425

Open
ad4mou wants to merge 4 commits into
mainfrom
fix/story-preview-streaming-bug
Open

Fix story preview bugs, and bugs of data Resolution for query ids#1425
ad4mou wants to merge 4 commits into
mainfrom
fix/story-preview-streaming-bug

Conversation

@ad4mou

@ad4mou ad4mou commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Charts and tables in the story preview now find their data while the agent is still writing, instead of showing "data unavailable" until it finishes.
  • Older versions of a story now load their own data, so their charts render correctly even after the agent has made new queries.
  • Cancelling the agent mid-write no longer leaves the unfinished text stuck in the panel, hiding every saved version behind it.
  • The preview stops dragging you to the bottom while the agent writes. It follows along only if you're already at the bottom, and stays put once you scroll up.
  • Long stories no longer lag and then dump everything at once — the preview does far less repeated work while streaming.
  • Restoring an older version now takes you straight to the new version instead of leaving you to click forward through the arrows.

Behavior note

Text-only edits don't show a live preview. The panel keeps the last saved version with an "Updating..." indicator until the edit lands. Streaming those edits meant redrawing the whole document per token, which caused huge lags and small text edits are a rare ask so I chose not to do this feature.

Closes #1426

Review in cubic

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

URL https://pr-1425-a2d65f2.preview.getnao.io
Commit a2d65f2

⚠️ No LLM API keys configured - you'll see the API key setup flow when trying to chat.


Preview will be automatically removed when this PR is closed.

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 24 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/frontend/src/components/side-panel/hooks/use-story-viewer-agent-state.ts Outdated
Comment thread apps/frontend/src/components/side-panel/hooks/use-story-viewer-content.ts Outdated
Comment thread apps/frontend/src/hooks/use-story-version-query-data.ts
Comment thread apps/frontend/src/lib/story-segment-stability.ts
Comment thread apps/frontend/src/components/side-panel/hooks/use-story-viewer-version-actions.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 4 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

@ad4mou
ad4mou requested a review from Bl3f August 20, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

story preview bugs, and bugs of data Resolution for query id

1 participant