Skip to content

fix(app): hydrate timeline message parents (#35269)#7

Open
maschwenk wants to merge 1 commit into
devfrom
forge-cherry-pick-hydration
Open

fix(app): hydrate timeline message parents (#35269)#7
maschwenk wants to merge 1 commit into
devfrom
forge-cherry-pick-hydration

Conversation

@maschwenk

Copy link
Copy Markdown

Cherry-pick of upstream commit a12d50e15 (fix(app): hydrate timeline message parents) which adds parent-message backfill to loadMessages — the core fix for the Forge deep-link blank-chat race.

What:

  • Cherry-picks a12d50e15 (parent-hydration) from anomalyco/opencode onto fork dev
  • Ports sessionNotFoundError / isLocalSessionNotFoundError from server-errors.ts (upstream 4a42caef2) which server-session.ts depends on
  • Reverts the retry-loop hack in model.ts to upstream's clean sync(id) resource (now unnecessary since parent-hydration makes the limit=2 load renderable)
  • Keeps only the one still-needed fork divergence: release meta.loading when the finishing load owns the slot (owns fix) — upstream still gates solely on the generation and can wedge loading=true forever

Net result: fork diverges from upstream by 8 lines in server-session.ts. model.ts and server-errors.ts are byte-identical to upstream.

Tests: 229 pass in packages/app (context + timeline dirs); forge-ui typecheck clean.

Supersedes #6.

Cherry-pick of anomalyco/opencode@a12d50e15 with conflict resolution:
keep upstream's parent-hydration in loadMessages, plus apply the
pre-existing fork fix that releases meta.loading when the finishing load
still owns the slot (upstream still gates this solely on the generation,
which can wedge loading=true forever after a generation change).

Also cherry-picks the sessionNotFoundError / isLocalSessionNotFoundError
exports from server-errors.ts that upstream added in 4a42cae, since
server-session.ts depends on them.
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