Skip to content

feat: integrate local Cursor report sources#18

Merged
Miss-you merged 3 commits into
mainfrom
sgsnowfly1993/you-11-实现-cursor-报表集成与目录覆盖语义
Mar 17, 2026

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"
Merged

feat: integrate local Cursor report sources#18
Miss-you merged 3 commits into
mainfrom
sgsnowfly1993/you-11-实现-cursor-报表集成与目录覆盖语义

Conversation

@Miss-you

@Miss-you Miss-you commented Mar 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • share report collection logic between daily and session
  • merge default local Cursor legacy/import/synced CSV sources while keeping --cursor-dir authoritative
  • add e2e coverage for import-only, sync-only, coexistence, fallback, and local-only reporting behavior
  • update help text, README, and README_zh for the local-only Cursor reporting contract

Validation

  • make fmt
  • make test
  • make vet
  • make lint (skipped by Makefile because golangci-lint is not installed in this environment)
  • make build
  • ./bin/codetok daily --help
  • ./bin/codetok session --help

Notes

  • reporting remains local-only and does not trigger implicit Cursor sync or remote API access
  • default Cursor discovery is intentionally limited to root legacy CSVs plus imports/ and synced/ subtrees

Copilot AI review requested due to automatic review settings March 16, 2026 09:11

Copilot AI 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.

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 cmd session collection helper used by both daily and session.
  • Update Cursor provider discovery to scan ~/.codetok/cursor/*.csv plus imports/ and synced/ 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.

@Miss-you

Copy link
Copy Markdown
Owner Author

@copilot fix conflicts

Copilot AI commented Mar 16, 2026

Copy link
Copy Markdown

@Miss-you I've opened a new pull request, #19, to work on those changes. Once the pull request is ready, I'll request review from you.

@Miss-you
Miss-you merged commit 000e7ca into main Mar 17, 2026
7 checks passed
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.

3 participants