feat: enhance ContextBadge and SessionContextPanel with new FlatInjec…#38
feat: enhance ContextBadge and SessionContextPanel with new FlatInjec…#38
Conversation
…tionList view - Updated ContextBadge to display the total count of tool outputs and task coordination items based on their breakdowns. - Introduced FlatInjectionList component for a denested view of injections, allowing users to toggle between grouped and flat views in SessionContextPanel. - Added state management for flat view toggle and integrated FlatInjectionList into the existing layout.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2fcf111f77
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case 'task-coordination': | ||
| for (const item of inj.breakdown) { | ||
| rows.push({ | ||
| key: `${inj.id}-${item.type}-${item.label}`, |
There was a problem hiding this comment.
Use unique keys for task-coordination flat rows
flattenInjections derives each task-coordination row key from inj.id, item.type, and item.label, but those fields are not guaranteed unique within a single turn (for example, multiple TaskCreate entries or repeated SendMessage calls to the same recipient share the same label/type). When that happens React receives duplicate keys and may reuse or drop rows during reconciliation, so the new flat view can misrepresent which coordination items consumed tokens. Add a per-item unique discriminator (such as an index or stable item id) to the key.
Useful? React with 👍 / 👎.
…tionList view