Visitar URL original
[fix] only display comment modal on intended file by natebrennand · Pull Request #254 · agavra/tuicr · GitHub
Skip to content

[fix] only display comment modal on intended file - #254

Merged
agavra merged 1 commit into
agavra:mainfrom
natebrennand:nate/multi-comment-bug
May 4, 2026
Merged

agavra merged 1 commit into
agavra:mainfrom
natebrennand:nate/multi-comment-bug

Conversation

@natebrennand

Copy link
Copy Markdown
Contributor

Resolves #253.

When the same line # is visible for multiple files, only the intended file will display the comment modal.

@natebrennand
natebrennand force-pushed the nate/multi-comment-bug branch from cba5274 to 757bc55 Compare May 2, 2026 01:36
Comment thread src/ui/app_layout.rs
line_comments,
LineSide::New,
ctx,
file_idx,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra arg being passed

Comment thread src/ui/app_layout.rs
// Check if we're adding/editing a comment on this line and side
let is_line_comment_mode = ctx.comment_input_mode && ctx.comment_line == Some((line_num, side));
let is_line_comment_mode = ctx.comment_input_mode
&& file_idx == ctx.current_file_idx

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the crux

@agavra agavra left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch @natebrennand - no idea how I haven't run into this myself after many hours using tuicr 😅

@agavra
agavra merged commit b7f2c3e into agavra:main May 4, 2026
4 checks passed
@natebrennand

Copy link
Copy Markdown
Contributor Author

nice catch @natebrennand - no idea how I haven't run into this myself after many hours using tuicr 😅

For whatever reason I started running into it immediately. I think because I'm landing a lot of refactors on a repo with many files 🤷🏻

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.

comment modal displayed on multiple files

2 participants