models: promote project identity and thread source facts#72
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThis PR restructures thread metadata models in SwiftASB by introducing ChangesThread Source and Project Identity Refactoring
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Sources/SwiftASB/SwiftASB.docc/ThreadHistoryAndObservables.md`:
- Line 25: The wording for the ThreadSource description is ambiguous because it
reads like an exhaustive list but omits categories such as exec and unknown;
update the prose in ThreadHistoryAndObservables.md to clarify that
CodexAppServer/ThreadSource (and the exported ThreadSource model) includes those
additional categories or is non-exhaustive—e.g., change the clause listing CLI,
app-server, editor, custom, or sub-agent to either add exec and unknown or
prepend “including”/“such as” to indicate it’s not a complete list; ensure
references to ThreadSource and ThreadInfo remain accurate.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 0ba0de36-8c5c-4dfe-aba4-aad844ad74e4
📒 Files selected for processing (16)
ROADMAP.mdSources/SwiftASB/History/ThreadHistoryStore.swiftSources/SwiftASB/Public/CodexAppServer+Library.swiftSources/SwiftASB/Public/CodexAppServer+ThreadLifecycle.swiftSources/SwiftASB/Public/CodexAppServer+ThreadManagement.swiftSources/SwiftASB/Public/CodexAppServer+WireMapping.swiftSources/SwiftASB/Public/CodexWorkspace.swiftSources/SwiftASB/SwiftASB.docc/CodexAppServer.mdSources/SwiftASB/SwiftASB.docc/CodexThread.mdSources/SwiftASB/SwiftASB.docc/SwiftUIObservableCompanions.mdSources/SwiftASB/SwiftASB.docc/ThreadHistoryAndObservables.mdTests/SwiftASBTests/Public/CodexAppServerLibraryTests.swiftTests/SwiftASBTests/Public/CodexAppServerStoredThreadTests.swiftTests/SwiftASBTests/Public/CodexAppServerThreadManagementTests.swiftdocs/maintainers/v1-public-api-audit.mddocs/maintainers/v1-public-api-symbol-inventory.md
💤 Files with no reviewable changes (1)
- Sources/SwiftASB/Public/CodexAppServer+ThreadManagement.swift
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d8685eec50
ℹ️ 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".
| public let projectInfo: CodexWorkspace.ProjectInfo | ||
| public let source: ThreadSource |
There was a problem hiding this comment.
Keep ThreadInfo.gitInfo as a compatibility shim
This change replaces ThreadInfo.gitInfo with projectInfo, which is a source-breaking API removal for existing v1 consumers that still read thread.info.gitInfo (or depend on CodexAppServer.GitInfo). Upgrading to this commit will fail their builds even though the underlying data is still available, so this should keep a deprecated compatibility accessor/type (backed by projectInfo.repository) instead of removing the old surface outright.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Skipping this intentionally. This branch is a cleanup pass, and the repo guidance says not to leave legacy compatibility shims after cleanup/typing work without explicit approval; the replacement data is now carried by ThreadInfo.projectInfo.repository.
| public let projectInfo: CodexWorkspace.ProjectInfo | ||
| public let source: CodexAppServer.ThreadSource |
There was a problem hiding this comment.
Preserve ThreadSnapshot Git accessors for v1 clients
The new projectInfo field is useful, but removing ThreadSnapshot.currentGitBranch/currentGitOriginURL is another source-level break for app code that already consumes Library.ThreadSnapshot directly. Since repository grouping and metadata still depend on these facts, keep deprecated read-only shims that map to projectInfo.repository so existing launcher/sidebar integrations continue compiling across minor upgrades.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Skipping this intentionally for the same cleanup reason. Library.ThreadSnapshot.projectInfo.repository is the promoted replacement, and keeping duplicate Git accessors would preserve the legacy surface this pass is removing.
Summary
Validation
Summary by CodeRabbit
New Features
Refactor
Documentation