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:

  1. Hover over any line in the diff
  2. A + icon appears in the left gutter
  3. Click to add a comment on that specific line

Line Comments on Commit History

When viewing past commits in the History tab:

  1. Expand a commit to view its diff
  2. Hover over any changed line
  3. Click the + icon to comment

Commit-Level Comments

For comments about an entire commit (not a specific line):

  1. Open the History tab
  2. Expand a commit
  3. Add a comment in the commit discussion area

Adding Comments

  1. Click the + icon on a diff line
  2. Type your comment in the input box
  3. Submit using:
    • Cmd+Enter (Mac) or Ctrl+Enter (Windows/Linux)
    • Or click the Comment button
  4. 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

  1. Hover over a comment
  2. Click Reply
  3. Type your reply
  4. 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

  1. Hover over your comment
  2. Click Edit
  3. Modify the text
  4. Click Comment to save

Edited comments show “(edited)” next to the timestamp.

Deleting Comments

  1. Hover over your comment
  2. 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:

  1. Comments are saved to .teamide/comments/
  2. Commit the comments folder to include them in version control
  3. Push to share with team members
  4. 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

Changelog

Date Change
2026-02-02 Initial documentation