feat(sessions): add scoped search and relationships - #6
Conversation
Bound AntiGravity list metadata, recover Cowork project paths, strip injected titles, expose Auto Review parents, and add role-scoped search plus directory filters. Co-Authored-By: Codex <codex@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0940c9ec43
ℹ️ 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".
| if role == .user { | ||
| guard let instruction = HumanPromptText.instruction(text) else { return nil } | ||
| text = instruction |
There was a problem hiding this comment.
Preserve long Codex prompts in the search index
For Codex user messages longer than 280 characters, HumanPromptText.instruction returns a brief-style preview capped at previewLimit, so text between character 281 and the index's existing 2,000-character per-message limit is discarded. A default .user search for terms in that portion of a prompt therefore stops finding sessions that were searchable before this change; strip the injected blocks without applying the brief preview cap before the normal index truncation.
Useful? React with 👍 / 👎.
| WHERE (s.title LIKE ? ESCAPE '\\' | ||
| OR s.summary LIKE ? ESCAPE '\\' | ||
| OR s.project_dir LIKE ? ESCAPE '\\')\(filter.sql) | ||
| OR s.session_id LIKE ? ESCAPE '\\')\(filter.sql) |
There was a problem hiding this comment.
Restrict the title scope to title matches
When a query matches only a session UUID, calling search(text:scopes: [.title]) still returns the session because the title-only metadata query also checks session_id. This violates the new scope contract and can produce unexpected results in a UI that explicitly enables only title search; identifiers need a separate scope or should be removed from this predicate.
Useful? React with 👍 / 👎.
| ## [Unreleased] | ||
|
|
||
| ### Added | ||
| - **Codex Auto Review relationships.** Guardian rollouts now encode their |
There was a problem hiding this comment.
Add the required co-author trailer
The reviewed commit ends after its verification section and contains no Co-Authored-By: trailer, although this repository requires that trailer on every commit; recreate the proposed commit with a trailer naming the actual participants before it is merged.
AGENTS.md reference: AGENTS.md:L165-L166
Useful? React with 👍 / 👎.
Summary
Verification