Code Comments
Inline code review comments on diffs and commits
Overview
TeamIDE includes a code comment system for discussing changes directly in the code. Comments can be added to:
- Individual lines in diffs (additions, deletions, or context lines)
- Entire commits (commit-level discussion)
Comments are stored in git and can be shared with team members by committing and pushing.
Where to Add Comments
Line Comments on Working Changes
When viewing uncommitted changes in the Changes panel:
- Hover over any line in the diff
- A + icon appears in the left gutter
- Click to add a comment on that specific line
Line Comments on Commit History
When viewing past commits in the History tab:
- Expand a commit to view its diff
- Hover over any changed line
- Click the + icon to comment
Commit-Level Comments
For comments about an entire commit (not a specific line):
- Open the History tab
- Expand a commit
- Add a comment in the commit discussion area
Adding Comments
- Click the + icon on a diff line
- Type your comment in the input box
- Submit using:
- Cmd+Enter (Mac) or Ctrl+Enter (Windows/Linux)
- Or click the Comment button
- Press Esc to cancel
The comment appears inline below the relevant line.
Viewing Comments
Lines with comments show a chat bubble icon in the left gutter. Click to expand and view the comment thread.
Each comment displays: - Author name and timestamp (e.g., “2m ago”, “3h ago”) - “(edited)” indicator if the comment was modified - Comment body with word wrapping
Comment Threads
Comments support threaded replies for focused discussions.
Replying to a Comment
- Hover over a comment
- Click Reply
- Type your reply
- Submit with Cmd/Ctrl+Enter or click Comment
Replies are indented and visually grouped with their parent comment.
Thread Structure
- Root comments: Top-level comments on a line or commit
- Replies: Nested under root comments with indentation
- Replies show Edit and Delete buttons (no further nesting)
Editing Comments
- Hover over your comment
- Click Edit
- Modify the text
- Click Comment to save
Edited comments show “(edited)” next to the timestamp.
Deleting Comments
- Hover over your comment
- Click Delete
Deleting a root comment also removes all its replies.
Storage and Sharing
How Comments Are Stored
Comments are saved as JSON files in your repository:
.teamide/
comments/
commits/ # Commit-level comments
files/ # Working tree comments
history/ # Historical diff comments
Sharing with Team Members
Since comments are stored in git:
- Comments are saved to
.teamide/comments/ - Commit the comments folder to include them in version control
- Push to share with team members
- Team members see comments after pulling
Comment Anchoring
Comments are anchored to specific lines using: - Line number - Line type (addition, deletion, context) - Surrounding context lines
This helps comments stay associated with the correct code even if the file changes.
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
| Cmd/Ctrl+Enter | Submit comment |
| Esc | Cancel comment |
Tips
- Review workflow: Use line comments to point out specific issues in code changes
- Commit discussions: Use commit-level comments for overall feedback
- Thread replies: Keep discussions organized by replying instead of adding new root comments
- Commit your comments: Remember to commit
.teamide/comments/to share feedback
Limitations
- Comments are stored locally in the repository
- No real-time sync (team members must pull to see new comments)
- Comments on deleted lines may become orphaned if code changes significantly
Related
- Code Module - Diff viewer and history
Changelog
| Date | Change |
|---|---|
| 2026-02-02 | Initial documentation |