Skip to content

Optimize initial session load summaries#1459

Open
mistercrunch wants to merge 1 commit into
mainfrom
optimize-session-initial-load-summary
Open

Optimize initial session load summaries#1459
mistercrunch wants to merge 1 commit into
mainfrom
optimize-session-initial-load-summary

Conversation

@mistercrunch

Copy link
Copy Markdown
Member

Summary

  • add an initial_summary sessions query path backed by selected SQL columns instead of full session rows
  • type the UI initial session store as InitialSessionSummary, omitting large/deferred fields like tasks, full description, and full custom_context
  • expose a capped first_prompt_preview for initial-load display/search and fetch full session data on demand for settings/template flows
  • add initial-load byte instrumentation for ?debugLoad=1

Notes

  • The DB column remains description for compatibility, but initial-load consumers now use the derived first_prompt_preview field.
  • tasks is intentionally omitted from the initial summary type rather than filled with [], so accidental full-session assumptions are caught by TypeScript.
  • genealogy and git_state remain in the summary because the tree/fork/SHA UI still depends on them.

Validation

  • pnpm i
  • pnpm check
  • pnpm --filter @agor/core test -- sessions.test.ts --run
  • pnpm --filter agor-ui test -- useAgorData.test.tsx --run

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