Skip to content

Add Overleaf review comment management commands#25

Open
shiquda wants to merge 1 commit into
aloth:mainfrom
shiquda:codex/overleaf-comments
Open

Add Overleaf review comment management commands#25
shiquda wants to merge 1 commit into
aloth:mainfrom
shiquda:codex/overleaf-comments

Conversation

@shiquda
Copy link
Copy Markdown

@shiquda shiquda commented May 30, 2026

Summary

This PR adds CLI support for managing Overleaf review comments.

New commands:

  • olcli comments list [project]
  • olcli comments add <file> <message> [project]
  • olcli comments resolve <threadId> [project]
  • olcli comments reopen <threadId> [project]
  • olcli comments delete <threadId> [project]

comments list includes source file, line/column, selected text, messages, status, and optional source context via --context. It also supports status filtering with --status open|resolved|all and JSON output via --json.

comments add can attach a comment to selected text using --text, or to an explicit source range using --line/--column/--length or --position/--length.

Implementation Notes

The implementation mirrors Overleaf's web editor behavior:

  • Uses the project Socket.IO endpoint to join documents and read comment ranges.
  • Uses /project/:projectId/threads to retrieve thread messages and resolved state.
  • Uses document-scoped comment routes for resolve/reopen/delete.
  • Adds comments by creating the thread message and applying the document comment range update.

Validation

  • Ran npm run build.
  • Ran npm test --if-present (no test script is currently configured).
  • Ran npm pack --dry-run.

Note: npm run lint is not currently runnable in this repository as-is because the package has a lint script but no ESLint dependency/config. I tested this separately and did not include lint setup in this PR to avoid mixing unrelated lint configuration and existing style cleanup into the feature change.

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.

1 participant