Skip to content

Expand idea box#5477

Merged
markijbema merged 14 commits intomainfrom
christiaan/suggestions
Jan 29, 2026
Merged

Expand idea box#5477
markijbema merged 14 commits intomainfrom
christiaan/suggestions

Conversation

@chrarnoldus
Copy link
Collaborator

@chrarnoldus chrarnoldus commented Jan 28, 2026

@changeset-bot
Copy link

changeset-bot bot commented Jan 28, 2026

🦋 Changeset detected

Latest commit: 3634b4d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Jan 28, 2026

Code Review Summary

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
webview-ui/src/components/kilocode/chat/IdeaSuggestionsBox.tsx N/A useMemo dependency won’t prevent re-shuffling (ideas array re-created each render)
webview-ui/src/components/kilocode/chat/IdeaSuggestionsBox.tsx 35 returnObjects: true result may not be an object at runtime (could produce char-array suggestions or crash)

SUGGESTION

File Line Issue
webview-ui/src/components/chat/ChatView.tsx 1688 Consider gating IdeaSuggestionsBox to avoid unnecessary task-history fetches
Files Reviewed (4 files)

@chrarnoldus chrarnoldus marked this pull request as draft January 28, 2026 22:23
@chrarnoldus chrarnoldus changed the title Christiaan/suggestions Expand idea box Jan 29, 2026
@chrarnoldus chrarnoldus marked this pull request as ready for review January 29, 2026 10:22
// Must be called before early return to satisfy React hooks rules
const shuffledIdeas = useMemo(
() =>
[...Object.values(t("ideaSuggestionsBox.ideas", { returnObjects: true }) as Record<string, string>)]
Copy link
Contributor

Choose a reason for hiding this comment

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

WARNING: Potential runtime/UX issue if i18n data is missing or misconfigured

react-i18next can return a fallback string for missing keys; with returnObjects: true that can still end up being a string at runtime. In that case Object.values(...) will produce an array of characters (or throw if the value is null/undefined), leading to odd suggestion content or a crash. Consider validating the t(...) result is an object before calling Object.values, and falling back to an empty list (or a known default set).

@markijbema markijbema merged commit 2231735 into main Jan 29, 2026
19 of 21 checks passed
@markijbema markijbema deleted the christiaan/suggestions branch January 29, 2026 10:41
@github-actions github-actions bot mentioned this pull request Jan 29, 2026
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.

2 participants