Skip to content

Conversation

@hassoncs
Copy link
Contributor

@hassoncs hassoncs commented Jan 8, 2026

2026-01-07 19 07 02

A one line change
(and a bunch of story stuff)

…ions stories

- Add withPostMessageMock decorator to mock VSCode postMessage API in Storybook
- Create stories for KilocodeNotifications component demonstrating various notification states
- Register decorator in Storybook preview configuration
- Update extension state mock with default model property for stories
@changeset-bot
Copy link

changeset-bot bot commented Jan 8, 2026

⚠️ No Changeset found

Latest commit: 960b08a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@hassoncs hassoncs requested a review from chrarnoldus January 8, 2026 03:23
@kiloconnect
Copy link
Contributor

kiloconnect bot commented Jan 8, 2026

Code Review Summary

Status: 2 Issues Found | Recommendation: Minor suggestions, safe to merge

Overview

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

SUGGESTION

File Line Issue
apps/storybook/src/decorators/withPostMessageMock.tsx 31 Unused index variable in forEach callback
apps/storybook/stories/KilocodeNotifications.stories.tsx 14 Unnecessary onDismiss prop - component accepts no props
Files Reviewed (5 files)
  • apps/storybook/.storybook/preview.ts - No issues
  • apps/storybook/src/decorators/withPostMessageMock.tsx - 1 suggestion
  • apps/storybook/src/utils/createExtensionStateMock.ts - No issues
  • apps/storybook/stories/KilocodeNotifications.stories.tsx - 1 suggestion
  • webview-ui/src/components/kilocode/KilocodeNotifications.tsx - No issues (cursor-pointer additions are appropriate)

Summary: This PR adds a withPostMessageMock decorator for Storybook to mock VSCode postMessage events, creates stories for KilocodeNotifications, and adds cursor-pointer class to notification buttons for better UX. The changes are well-structured and follow existing patterns. The two suggestions are minor code quality improvements.

Fix these issues in Kilo Cloud

}

const timers: NodeJS.Timeout[] = []
messages.forEach((message, index) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

SUGGESTION: Unused variable index

The index parameter is declared but never used. Consider removing it or prefixing with underscore to indicate it's intentionally unused.

Suggested change
messages.forEach((message, index) => {
messages.forEach((message) => {

},
},
args: {
onDismiss: fn(),
Copy link
Contributor

Choose a reason for hiding this comment

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

SUGGESTION: Unnecessary onDismiss prop

The KilocodeNotifications component is defined as React.FC with no props, so this onDismiss arg will be ignored. Consider removing it to avoid confusion.

Suggested change
onDismiss: fn(),

kiloconnect bot added a commit that referenced this pull request Jan 8, 2026
- Remove unused index parameter in withPostMessageMock forEach loop
- Remove onDismiss arg from KilocodeNotifications stories since component doesn't accept it
@hassoncs hassoncs merged commit 69095d2 into main Jan 8, 2026
12 checks passed
@hassoncs hassoncs deleted the notification-close-button branch January 8, 2026 16:25
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.

3 participants