Skip to content

runtime: add app-wide thread library#66

Merged
gaelic-ghost merged 6 commits into
mainfrom
design/history-reconciliation-queries
May 6, 2026
Merged

runtime: add app-wide thread library#66
gaelic-ghost merged 6 commits into
mainfrom
design/history-reconciliation-queries

Conversation

@gaelic-ghost

Copy link
Copy Markdown
Owner

Summary

  • add CodexAppServer.makeLibrary() and the app-wide Library observable for stored thread lists
  • publish unarchived, archived, cwd-grouped, selected, app-snapshot, and current Git branch state for GUI/CLI consumers
  • record query descriptor and roadmap guidance for cwd-first listing, future repo-root grouping, and richer Git observables

Verification

  • swift test --filter CodexAppServerLibraryTests
  • swift test
  • git diff --check

@gaelic-ghost gaelic-ghost added the enhancement New feature or request label May 6, 2026
@gaelic-ghost gaelic-ghost merged commit 381a154 into main May 6, 2026
1 check passed
@gaelic-ghost gaelic-ghost deleted the design/history-reconciliation-queries branch May 6, 2026 03:02

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5a341b8ec

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1025 to +1027
return try await historyStore.threadListSnapshots()
.map(Library.ThreadSnapshot.init)
.filter { thread in

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enforce query limit on library snapshot reads

libraryThreadSnapshots(query:) applies archive/cwd/search filters but never applies query.limit, so makeLibrary(configuration:) can load and publish every matching thread in local history even when callers requested a bounded query. This breaks the expected behavior of ThreadListQD.limit for local-first startup and can significantly increase memory/UI work for users with large thread stores.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant