This repository was archived by the owner on Jan 30, 2026. It is now read-only.
fix: message card rounding with hidden messages#123
Merged
Conversation
Contributor
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 30ce885 in 8 seconds. Click for details.
- Reviewed
81lines of code in1files - Skipped
0files when reviewing. - Skipped posting
0draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
Workflow ID: wflow_7az81lGVLCt2qxf0
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Hidden messages (like auto-included lessons) should not affect chain type calculations for rounding. Now treats messages with hide=true as non-existent when determining if a message is at the start/end of a chain.
30ce885 to
b2991c3
Compare
Contributor
Greptile OverviewGreptile SummaryThis PR fixes a UI bug where message card rounding was incorrect when hidden messages (like auto-included lessons) appeared before the first visible message.
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Component as ConversationContent
participant Helpers as Visibility Helpers
participant ChatMessage
participant Utils as messageUtils
Component->>Component: Render message list
loop For each message
Component->>Component: Check if message is visible
alt Message is hidden
Component->>Component: Render empty div
else Message is visible
Component->>Helpers: findPrevVisibleIndex(currentIndex, log)
Helpers->>Helpers: Loop backwards through messages
Helpers->>Helpers: Check isMessageVisible for each
Helpers-->>Component: Return previous visible index
Component->>Helpers: findNextVisibleIndex(currentIndex, log)
Helpers->>Helpers: Loop forwards through messages
Helpers->>Helpers: Check isMessageVisible for each
Helpers-->>Component: Return next visible index
Component->>Component: Get previousMessage$ and nextMessage$
Component->>ChatMessage: Render with visible neighbors
ChatMessage->>Utils: useMessageChainType(message$, previousMessage$, nextMessage$)
Utils->>Utils: Calculate chain type based on visible neighbors
Utils-->>ChatMessage: Return chain type (standalone/start/middle/end)
ChatMessage->>ChatMessage: Apply correct rounding based on chain type
end
end
|
Contributor
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed b2991c3 in 15 seconds. Click for details.
- Reviewed
35lines of code in1files - Skipped
0files when reviewing. - Skipped posting
0draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
Workflow ID: wflow_XPshO2rku20ys0p2
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When hidden messages (like auto-included lessons) appear before the first visible message, the rounding was incorrect because prev/next message lookup used array indices ignoring visibility.
Now finds the actual previous/next visible message for proper chain type calculation.
Important
Fixes message chain rounding by filtering hidden messages in
useMessageChainType()usingisVisibleForChain()inmessageUtils.ts.useMessageChainType()inmessageUtils.ts.isVisibleForChain()to filter out hidden messages for chain calculations.useMessageChainType()to useisVisibleForChain()for determiningisChainStartandisChainEnd.This description was created by
for b2991c3. You can customize this summary. It will automatically update as commits are pushed.