feat: integrate local Cursor report sources#18
Merged
Hidden character warning
The head ref may contain hidden characters: "sgsnowfly1993/you-11-\u5b9e\u73b0-cursor-\u62a5\u8868\u96c6\u6210\u4e0e\u76ee\u5f55\u8986\u76d6\u8bed\u4e49"
Conversation
There was a problem hiding this comment.
Pull request overview
This PR unifies session collection logic between daily and session, and expands Cursor’s default local CSV discovery to merge legacy root exports with imports/ and synced/ caches while keeping --cursor-dir authoritative and local-only.
Changes:
- Introduce a shared
cmdsession collection helper used by bothdailyandsession. - Update Cursor provider discovery to scan
~/.codetok/cursor/*.csvplusimports/andsynced/trees by default, with explicit directory overrides scanning only the provided path. - Add unit + e2e coverage for Cursor default-root behavior, override behavior, malformed CSV fallback, and “no remote access” expectations; update README/help text accordingly.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| provider/cursor/parser.go | Adds default-root Cursor CSV path resolution (legacy root + imports/synced) and keeps explicit dir recursive scanning authoritative. |
| provider/cursor/parser_test.go | Adds unit tests covering default-root merge behavior, single-source default-root behavior, and explicit-dir isolation. |
| cmd/collect.go | Adds shared provider session collection helper with consistent filter/override/skip-missing behavior. |
| cmd/collect_test.go | Adds unit tests for the shared collector (base-dir vs per-provider override, provider filter, skip missing, error wrapping). |
| cmd/daily.go | Routes daily through the shared collector and updates --cursor-dir help text. |
| cmd/session.go | Routes session through the shared collector and updates --cursor-dir help text. |
| e2e/e2e_test.go | Adds e2e cases for Cursor import-only, sync-only, merged sources, invalid synced CSV fallback, override behavior, and proxy trap (no remote access). |
| README.md | Updates Cursor discovery contract and clarifies local-only behavior + --cursor-dir semantics. |
| README_zh.md | Same as README.md, in Chinese. |
| docs/plans/2026-03-16-cursor-report-integration.md | Adds implementation plan documentation for the refactor and Cursor source integration. |
| docs/plans/2026-03-16-cursor-report-integration-design.md | Adds design doc describing the intended Cursor discovery/override behavior and testing strategy. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
Author
|
@copilot fix conflicts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dailyandsession--cursor-dirauthoritativeValidation
make fmtmake testmake vetmake lint(skipped by Makefile becausegolangci-lintis not installed in this environment)make build./bin/codetok daily --help./bin/codetok session --helpNotes
imports/andsynced/subtrees