From 076d8ab1366a1c33f5c5eb944d1e5c9faf288d0c Mon Sep 17 00:00:00 2001 From: kirillk Date: Mon, 1 Jun 2026 15:26:02 -0400 Subject: [PATCH 01/16] feat(jetbrains): add empty session feedback UI --- .changeset/stellar-forest-feedback.md | 5 + .kilo/plans/1780256109130-stellar-forest.md | 109 ++++++++++ .../ai/kilocode/client/session/SessionUi.kt | 2 +- .../session/ui/empty/EmptySessionFeedback.kt | 117 +++++++++++ .../ui/{ => empty}/EmptySessionPanel.kt | 192 ++++------------- .../client/session/ui/empty/RecentsList.kt | 198 ++++++++++++++++++ .../kotlin/ai/kilocode/client/ui/UiStyle.kt | 14 ++ .../src/main/resources/icons/discord.svg | 3 + .../src/main/resources/icons/discord_dark.svg | 3 + .../resources/messages/KiloBundle.properties | 5 + .../messages/KiloBundle_ar.properties | 5 + .../messages/KiloBundle_bs.properties | 5 + .../messages/KiloBundle_da.properties | 5 + .../messages/KiloBundle_de.properties | 5 + .../messages/KiloBundle_es.properties | 5 + .../messages/KiloBundle_fr.properties | 5 + .../messages/KiloBundle_ja.properties | 5 + .../messages/KiloBundle_ko.properties | 5 + .../messages/KiloBundle_nl.properties | 5 + .../messages/KiloBundle_no.properties | 5 + .../messages/KiloBundle_pl.properties | 5 + .../messages/KiloBundle_pt_BR.properties | 5 + .../messages/KiloBundle_ru.properties | 5 + .../messages/KiloBundle_th.properties | 5 + .../messages/KiloBundle_tr.properties | 5 + .../messages/KiloBundle_uk.properties | 5 + .../messages/KiloBundle_zh_CN.properties | 5 + .../messages/KiloBundle_zh_TW.properties | 5 + .../client/session/SessionUiFactoryTest.kt | 4 +- .../client/session/SessionUiLayoutTest.kt | 2 +- .../session/ui/EmptySessionPanelTest.kt | 48 ++++- 31 files changed, 631 insertions(+), 161 deletions(-) create mode 100644 .changeset/stellar-forest-feedback.md create mode 100644 .kilo/plans/1780256109130-stellar-forest.md create mode 100644 packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionFeedback.kt rename packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/{ => empty}/EmptySessionPanel.kt (54%) create mode 100644 packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/RecentsList.kt create mode 100644 packages/kilo-jetbrains/frontend/src/main/resources/icons/discord.svg create mode 100644 packages/kilo-jetbrains/frontend/src/main/resources/icons/discord_dark.svg diff --git a/.changeset/stellar-forest-feedback.md b/.changeset/stellar-forest-feedback.md new file mode 100644 index 00000000000..98dd0d17c1d --- /dev/null +++ b/.changeset/stellar-forest-feedback.md @@ -0,0 +1,5 @@ +--- +"@kilocode/kilo-jetbrains": patch +--- + +Add Feedback & Support to the JetBrains empty session screen. diff --git a/.kilo/plans/1780256109130-stellar-forest.md b/.kilo/plans/1780256109130-stellar-forest.md new file mode 100644 index 00000000000..3aafa6c0dd9 --- /dev/null +++ b/.kilo/plans/1780256109130-stellar-forest.md @@ -0,0 +1,109 @@ +# Plan: JetBrains Feedback & Support Button + +## Goal +Add the VS Code empty-state `Feedback & Support` affordance to the JetBrains plugin, including a non-modal popup with the same three destinations: + +- GitHub issues: `https://github.com/Kilo-Org/kilocode/issues/new/choose` +- Discord: `https://kilo.ai/discord` +- Customer support: `https://kilo.ai/support` + +The popup must hide when clicking outside or pressing Escape. + +## Findings + +- The JetBrains empty state is `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/EmptySessionPanel.kt`. +- It already renders the logo, welcome copy, recents, and `Show History`; this is the right place to add the button. +- The VS Code implementation is: + - Button: `packages/kilo-vscode/webview-ui/src/components/chat/MessageList.tsx` + - Popup content: `packages/kilo-vscode/webview-ui/src/components/chat/FeedbackDialog.tsx` + - Styling: `packages/kilo-vscode/webview-ui/src/styles/welcome.css` +- Local IntelliJ API source is available at `$INTELLIJ_REPO=/Users/kirillk/products/intellij-community`. +- IntelliJ popup API confirmed in local source: + - `JBPopupFactory.getInstance().createComponentPopupBuilder(content, focusComponent)` + - `setModalContext(false)` for non-modal context + - `setRequestFocus(false)` / `setFocusable(false)` if we want the popup not to steal focus + - `setCancelOnClickOutside(true)` for outside-click dismissal + - `setCancelKeyEnabled(true)` for Escape dismissal + - `setCancelOnWindowDeactivation(true)` and `setCancelOnOtherWindowOpen(true)` are available and appropriate for cleanup +- IntelliJ platform icons found in `AllIcons`: + - Feedback button: `AllIcons.Ide.Feedback` + - GitHub action: `AllIcons.Vcs.Vendors.Github` + - Support/help action: `AllIcons.Actions.Help` or `AllIcons.General.ContextHelp` + - Discord: no platform icon found. Add a Discord icon by borrowing the existing VS Code/kilo-ui Discord SVG artwork and adapting it into the JetBrains plugin resources with IntelliJ-compatible SVG colors and dark variant if needed. + +## Implementation Steps + +1. Add localized JetBrains bundle keys. + - Add base English strings to `frontend/src/main/resources/messages/KiloBundle.properties`: + - `feedback.button=Feedback & Support` + - `feedback.dialog.message=We'd love to hear your feedback or help with any issues you're experiencing.` + - `feedback.dialog.github=Report an issue on GitHub` + - `feedback.dialog.discord=Join our Discord community` + - `feedback.dialog.support=Customer Support` + - Reuse existing cancel text if present; otherwise add `common.cancel=Cancel` only if needed. + - Add matching keys to localized `KiloBundle_*.properties` files. If accurate translations are not already available from the VS Code i18n files, copy the VS Code translations for matching locales where practical and leave English fallback only if the JetBrains bundle mechanism supports it cleanly. + +2. Extend `EmptySessionPanel` UI. + - Add a new retained `FeedbackButton`, styled to match VS Code conceptually: + - feedback icon + `Feedback & Support` text + - dashed link-colored border + - transparent background + - hand cursor + - hover state fills with link color and flips foreground/background for contrast + - Use IntelliJ theme APIs instead of raw colors: + - link color: `JBUI.CurrentTheme.Link.Foreground.ENABLED` + - hover link color: `JBUI.CurrentTheme.Link.Foreground.HOVERED` if useful + - editor/panel background from existing session style or `UiStyle.Colors.editorBackground()` / component background + - spacing via `UiStyle.Gap` / `JBUI.Borders` + - rounded arc via `UiStyle.Arc.component()` or `JBUI.getInt("Button.arc", 6)` at paint time + - Add the feedback button below the existing `Show History` button in the empty-state south area, keeping the current centered layout. + - Keep Swing mutations on EDT and preserve retained-component behavior. + +3. Implement the feedback popup in frontend Swing code. + - Add a small popup builder method/class inside `EmptySessionPanel.kt` or a new nearby UI file if the file would become too large. + - Content should mirror VS Code: + - Kilo logo at top using existing `/icons/kilo-content.svg` + - message text + - three action buttons/rows for GitHub, Discord, and Customer Support + - every action should have an icon: `AllIcons.Vcs.Vendors.Github` for GitHub, the borrowed Discord SVG for Discord, and `AllIcons.Actions.Help` or `AllIcons.General.ContextHelp` for Customer Support + - optional Cancel button if it fits the JetBrains UX; Escape/outside click already dismisses + - Add the Discord icon asset under `frontend/src/main/resources/icons/` using the plugin's existing icon naming pattern, for example `discord.svg` and `discord_dark.svg` if the borrowed asset needs separate theme variants. + - Load the Discord icon with `IconLoader.getIcon("/icons/discord.svg", EmptySessionPanel::class.java)` or a small Kilo-owned icon object if multiple call sites need it. + - Use `BrowserUtil.browse(url)` to open links. + - Close the popup after opening a URL. + - Use `JBPopupFactory.createComponentPopupBuilder(content, null)` and configure: + - `.setModalContext(false)` + - `.setRequestFocus(false)` + - `.setFocusable(false)` unless keyboard tabbing inside popup is desired; if buttons need keyboard focus, use `.setFocusable(true)` with `.setRequestFocus(false)` + - `.setCancelOnClickOutside(true)` + - `.setCancelKeyEnabled(true)` + - `.setCancelOnWindowDeactivation(true)` + - `.setCancelOnOtherWindowOpen(true)` + - `.setResizable(false)` + - `.setMovable(false)` + - Show with `popup.showUnderneathOf(feedbackButton)`. + +4. Add test coverage in `EmptySessionPanelTest.kt`. + - Assert feedback button text uses `KiloBundle.message("feedback.button")`. + - Assert feedback button has hand cursor and visible border semantics. + - Add an injectable browse callback or popup action callback only if needed for testing without launching browsers; keep it minimal and avoid production-only test hooks if component traversal can exercise enough behavior. + - Add a test that clicking the feedback button creates/shows popup content, if feasible in `BasePlatformTestCase`; otherwise test the retained popup content builder/action rows directly through package-internal methods. + - Assert the three action labels exist and URL callbacks map to the same URLs as VS Code. + - Assert the Discord action has an icon, so the plan cannot regress to a text-only Discord row. + +5. Add release note. + - This is user-facing for the JetBrains plugin, so add a patch changeset under `.changeset/` unless the repo has a JetBrains-specific release-note mechanism that supersedes changesets. + - Suggested text: `Add Feedback & Support to the JetBrains empty session screen.` + +6. Verify. + - Run the focused frontend/JetBrains tests first, preferably from `packages/kilo-jetbrains/`: + - `./gradlew :frontend:test --tests "ai.kilocode.client.session.ui.EmptySessionPanelTest"` + - Run JetBrains typecheck from `packages/kilo-jetbrains/`: + - `bun run typecheck` or `./gradlew typecheck` + - If touching only frontend UI and tests pass, no backend/SDK generation is needed. + +## Notes + +- Do not add Kotlin UI DSL, Compose, or JCEF. +- Do not modify shared opencode files; this work is entirely under `packages/kilo-jetbrains/` plus a changeset. +- Prefer platform icons where available, but explicitly borrow/add the Discord icon because `AllIcons` does not provide one and the popup should match the VS Code button set visually. diff --git a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/SessionUi.kt b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/SessionUi.kt index 133af6862f3..8a4439e31c8 100644 --- a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/SessionUi.kt +++ b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/SessionUi.kt @@ -12,7 +12,7 @@ import ai.kilocode.client.session.model.SessionModelEvent import ai.kilocode.client.session.model.SessionState import ai.kilocode.client.session.scroll.SessionScroll import ai.kilocode.client.session.ui.ConnectionPanel -import ai.kilocode.client.session.ui.EmptySessionPanel +import ai.kilocode.client.session.ui.empty.EmptySessionPanel import ai.kilocode.client.session.ui.LoadingPanel import ai.kilocode.client.session.ui.ReasoningPicker import ai.kilocode.client.session.ui.mode.ModePicker diff --git a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionFeedback.kt b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionFeedback.kt new file mode 100644 index 00000000000..48ca0fcc3e4 --- /dev/null +++ b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionFeedback.kt @@ -0,0 +1,117 @@ +package ai.kilocode.client.session.ui.empty + +import ai.kilocode.client.plugin.KiloBundle +import ai.kilocode.client.ui.UiStyle +import ai.kilocode.client.ui.layout.HAlign +import ai.kilocode.client.ui.layout.Stack +import ai.kilocode.client.ui.layout.VAlign +import ai.kilocode.client.ui.layout.align +import com.intellij.icons.AllIcons +import com.intellij.openapi.ui.popup.Balloon +import com.intellij.openapi.ui.popup.JBPopupFactory +import com.intellij.openapi.util.IconLoader +import com.intellij.ui.awt.RelativePoint +import com.intellij.ui.components.JBLabel +import com.intellij.util.concurrency.annotations.RequiresEdt +import com.intellij.util.ui.UIUtil +import com.intellij.xml.util.XmlStringUtil +import java.awt.Cursor +import java.awt.Point +import java.awt.event.MouseAdapter +import java.awt.event.MouseEvent +import javax.swing.JButton +import javax.swing.JComponent + +internal class EmptySessionFeedback( + private val browse: (String) -> Unit, +) { + val button: JButton = FeedbackButton().apply { + addActionListener { popup() } + } + + @RequiresEdt + private fun popup() { + lateinit var balloon: Balloon + val content = content { url -> + browse(url) + balloon.hide() + } + val point = RelativePoint(button, Point(button.width / 2, button.height)) + balloon = JBPopupFactory.getInstance() + .createBalloonBuilder(content) + .setHideOnClickOutside(true) + .setHideOnKeyOutside(true) + .setHideOnAction(true) + .setHideOnFrameResize(true) + .setBorderColor(UiStyle.Balloon.border()) + .setFillColor(UiStyle.Balloon.bg()) + .setBorderInsets(UiStyle.Balloon.insets()) + .setPointerSize(UiStyle.Balloon.pointer()) + .setCornerRadius(UiStyle.Balloon.arc()) + .createBalloon() + + balloon.show(point, Balloon.Position.below) + } + + private class FeedbackButton : EmptySessionPanel.ShowHistoryButton(buttonHtml(), AllIcons.Ide.Feedback) + + private class ActionButton(text: String, icon: javax.swing.Icon, action: () -> Unit) : JButton(text, icon) { + init { + cursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR) + addActionListener { action() } + } + } + + companion object { + @RequiresEdt + fun content(open: (String) -> Unit): JComponent { + val logo = JBLabel(IconLoader.getIcon("/icons/kilo-content.svg", EmptySessionPanel::class.java)).apply { + horizontalAlignment = JBLabel.CENTER + cursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR) + addMouseListener(object : MouseAdapter() { + override fun mouseClicked(e: MouseEvent) { + open(KILO_URL) + } + }) + } + val msg = JBLabel(messageHtml()).apply { + foreground = UIUtil.getLabelForeground() + horizontalAlignment = JBLabel.CENTER + } + val actions = Stack.vertical(gap = UiStyle.Gap.sm()) + .next(ActionButton(KiloBundle.message("feedback.dialog.github"), AllIcons.Vcs.Vendors.Github) { + open(GITHUB_ISSUES_URL) + }.align(HAlign.CENTER, VAlign.CENTER)) + .next(ActionButton(KiloBundle.message("feedback.dialog.discord"), DISCORD_ICON) { + open(DISCORD_URL) + }.align(HAlign.CENTER, VAlign.CENTER)) + .next(ActionButton(KiloBundle.message("feedback.dialog.support"), AllIcons.Actions.Help) { + open(SUPPORT_URL) + }.align(HAlign.CENTER, VAlign.CENTER)) + + return Stack.vertical(gap = UiStyle.Gap.lg()) + .fill(UiStyle.Gap.sm()) + .next(logo.align(HAlign.CENTER, VAlign.CENTER)) + .next(msg.align(HAlign.CENTER, VAlign.CENTER)) + .fill(UiStyle.Gap.xs()) + .next(actions.align(HAlign.CENTER, VAlign.CENTER)) + .fill(UiStyle.Gap.xs()) + } + + fun urls() = listOf(GITHUB_ISSUES_URL, DISCORD_URL, SUPPORT_URL) + + private fun messageHtml() = XmlStringUtil.wrapInHtml( + "
${XmlStringUtil.escapeString(KiloBundle.message("feedback.dialog.message"))}
" + ) + + private fun buttonHtml() = XmlStringUtil.wrapInHtml( + XmlStringUtil.escapeString(KiloBundle.message("feedback.button")) + ) + + private const val KILO_URL = "https://kilocode.ai" + private const val GITHUB_ISSUES_URL = "https://github.com/Kilo-Org/kilocode/issues/new/choose" + private const val DISCORD_URL = "https://kilo.ai/discord" + private const val SUPPORT_URL = "https://kilo.ai/support" + private val DISCORD_ICON = IconLoader.getIcon("/icons/discord.svg", EmptySessionPanel::class.java) + } +} diff --git a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/EmptySessionPanel.kt b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionPanel.kt similarity index 54% rename from packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/EmptySessionPanel.kt rename to packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionPanel.kt index 7f8283a7067..bd91413f63a 100644 --- a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/EmptySessionPanel.kt +++ b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionPanel.kt @@ -1,31 +1,25 @@ -package ai.kilocode.client.session.ui +package ai.kilocode.client.session.ui.empty import ai.kilocode.client.plugin.KiloBundle import ai.kilocode.client.session.SessionActivityKind -import ai.kilocode.client.session.SessionRef -import ai.kilocode.client.session.history.HistoryActivitySnapshot -import ai.kilocode.client.session.history.HistoryTime -import ai.kilocode.client.session.history.LocalHistoryItem -import ai.kilocode.client.session.history.itemAt -import ai.kilocode.client.session.history.title +import ai.kilocode.client.session.controller.SessionController import ai.kilocode.client.session.ui.style.SessionEditorStyle import ai.kilocode.client.session.ui.style.SessionEditorStyleTarget import ai.kilocode.client.session.ui.style.SessionUiStyle -import ai.kilocode.client.session.controller.SessionController -import ai.kilocode.client.ui.FilledBadgeIcon import ai.kilocode.client.ui.UiStyle import ai.kilocode.client.ui.layout.Align import ai.kilocode.client.ui.layout.HAlign +import ai.kilocode.client.ui.layout.Stack import ai.kilocode.client.ui.layout.VAlign import ai.kilocode.client.ui.layout.align import ai.kilocode.rpc.dto.SessionDto import com.intellij.icons.AllIcons +import com.intellij.ide.BrowserUtil import com.intellij.openapi.Disposable import com.intellij.openapi.util.Disposer import com.intellij.openapi.util.IconLoader import com.intellij.util.concurrency.annotations.RequiresEdt import com.intellij.ui.components.JBLabel -import com.intellij.ui.components.JBList import com.intellij.util.ui.Centerizer import com.intellij.util.ui.JBUI import com.intellij.util.ui.UIUtil @@ -35,19 +29,14 @@ import java.awt.BorderLayout import java.awt.Component import java.awt.Cursor import java.awt.Dimension -import java.awt.FlowLayout import java.awt.Graphics import java.awt.Graphics2D import java.awt.RenderingHints import java.awt.event.HierarchyEvent import java.awt.event.MouseAdapter import java.awt.event.MouseEvent -import java.awt.event.MouseMotionAdapter -import javax.swing.DefaultListModel import javax.swing.JButton -import javax.swing.JList -import javax.swing.ListCellRenderer -import javax.swing.ListSelectionModel +import javax.swing.JComponent import javax.swing.Timer /** @@ -63,51 +52,20 @@ class EmptySessionPanel( private val history: () -> Unit = {}, private val activity: () -> Map = { emptyMap() }, private val titles: () -> Map = { emptyMap() }, + private val browse: (String) -> Unit = BrowserUtil::browse, ) : BorderLayoutPanel(), Disposable, SessionEditorStyleTarget { val view: Align = align(HAlign.CENTER, VAlign.CENTER) - private val model = DefaultListModel() - private var hover = -1 private var style = SessionEditorStyle.current() - private var snapshot = HistoryActivitySnapshot() private val timer = Timer(ACTIVITY_MS) { syncActivity() } - - private val recentTitle = JBLabel(KiloBundle.message("session.empty.recent")).apply { - foreground = UIUtil.getContextHelpForeground() - } - - private val list = JBList(model).apply { - isOpaque = false - selectionMode = ListSelectionModel.SINGLE_SELECTION - visibleRowCount = SessionUiStyle.RecentSessions.LIMIT - cellRenderer = SessionRenderer() - cursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR) - emptyText.clear() - addMouseListener(object : MouseAdapter() { - override fun mouseClicked(e: MouseEvent) { - val item = itemAt(this@apply, e) ?: return - controller.openSession(SessionRef.Local(item.session)) - } - - override fun mouseExited(e: MouseEvent) { - hover = -1 - repaint() - } - }) - addMouseMotionListener(object : MouseMotionAdapter() { - override fun mouseMoved(e: MouseEvent) { - val index = index(e) - if (hover == index) return - hover = index - repaint() - } - }) - } + private val recent = RecentsList(recents, controller) private val historyButton = ShowHistoryButton().apply { addActionListener { history() } } + private val feedback = EmptySessionFeedback(browse) + private val welcomeLabel = JBLabel(welcomeHtml()).apply { foreground = UIUtil.getContextHelpForeground() horizontalAlignment = JBLabel.CENTER @@ -134,7 +92,6 @@ class EmptySessionPanel( Disposer.register(parent, this) isOpaque = false applyStyle(SessionEditorStyle.current()) - setSessions(recents) addHierarchyListener { e -> if (e.changeFlags and HierarchyEvent.SHOWING_CHANGED.toLong() == 0L) return@addHierarchyListener if (isShowing) { @@ -159,40 +116,28 @@ class EmptySessionPanel( add(description.align(HAlign.CENTER, VAlign.CENTER), BorderLayout.CENTER) } - val recent = BorderLayoutPanel().apply { - isOpaque = false - add(recentTitle, BorderLayout.NORTH) - add(list, BorderLayout.CENTER) - } - val south = BorderLayoutPanel().apply { isOpaque = false - add(Centerizer(historyButton, Centerizer.TYPE.HORIZONTAL), BorderLayout.CENTER) + add(Stack.vertical(gap = UiStyle.Gap.lg()) + .next(Centerizer(historyButton, Centerizer.TYPE.HORIZONTAL)) + .next(Centerizer(feedback.button, Centerizer.TYPE.HORIZONTAL)), BorderLayout.CENTER) } add(header, BorderLayout.NORTH) - add(recent, BorderLayout.CENTER) + if (recent.hasSessions()) add(recent, BorderLayout.CENTER) add(south, BorderLayout.SOUTH) } - private fun setSessions(sessions: List) { - model.clear() - sessions.take(SessionUiStyle.RecentSessions.LIMIT).map(::LocalHistoryItem).forEach(model::addElement) - revalidate() - repaint() - } - - internal fun recentCount() = model.size() + internal fun recentCount() = recent.count() internal fun selectRecent(index: Int) { - list.selectedIndex = index + recent.select(index) } - internal fun selectedRecent() = list.selectedIndex + internal fun selectedRecent() = recent.selected() internal fun clickRecent(index: Int) { - list.selectedIndex = index - controller.openSession(SessionRef.Local(model.getElementAt(index).session)) + recent.click(index) } internal fun clickShowHistory() { @@ -201,13 +146,25 @@ class EmptySessionPanel( internal fun showHistoryText() = historyButton.text + internal fun feedbackText() = KiloBundle.message("feedback.button") + + internal fun feedbackCursor() = feedback.button.cursor.type + + internal fun feedbackIcon() = feedback.button.icon + + internal fun feedbackBorderPainted() = feedback.button.isBorderPainted + + internal fun feedbackContent(open: (String) -> Unit = {}): JComponent = EmptySessionFeedback.content(open) + + internal fun feedbackUrls() = EmptySessionFeedback.urls() + internal fun showHistoryBorderPainted() = historyButton.isBorderPainted internal fun showHistoryCursor() = historyButton.cursor.type - internal fun recentCursor() = list.cursor.type + internal fun recentCursor() = recent.cursorType() - internal fun recentVisible() = true + internal fun recentVisible() = recent.hasSessions() internal fun explanationText() = KiloBundle.message("session.empty.welcome") @@ -226,92 +183,25 @@ class EmptySessionPanel( internal fun activeView() = getComponent(0) internal fun text(session: SessionDto, now: Long = System.currentTimeMillis()) = - HistoryTime.relative(LocalHistoryItem(session), now) + recent.text(session, now) internal fun rendererComponent( session: SessionDto, selected: Boolean = false, hover: Boolean = false, ): Component { - val old = this.hover - this.hover = if (hover) 0 else -1 - return list.cellRenderer.getListCellRendererComponent(list, LocalHistoryItem(session), 0, selected, false).also { - this.hover = old - } + return recent.renderer(session, selected, hover) } @RequiresEdt internal fun syncActivity() { - val next = HistoryActivitySnapshot(activity(), titles()) - val changed = snapshot.changed(next) - snapshot = next - repaintRows(changed) + recent.sync(activity(), titles()) } - private fun repaintRows(ids: Set) { - if (ids.isEmpty()) return - repeat(model.size()) { index -> - if (model.getElementAt(index).id !in ids) return@repeat - list.getCellBounds(index, index)?.let(list::repaint) - } - } - - private fun index(e: MouseEvent): Int { - val idx = list.locationToIndex(e.point) - if (idx < 0) return -1 - val box = list.getCellBounds(idx, idx) ?: return -1 - if (!box.contains(e.point)) return -1 - return idx - } - - private inner class SessionRenderer : BorderLayoutPanel(), ListCellRenderer { - private val title = JBLabel() - private val badge = JBLabel().apply { - border = JBUI.Borders.emptyLeft(JBUI.CurrentTheme.ActionsList.elementIconGap()) - } - private val time = JBLabel() - private val head = BorderLayoutPanel().apply { - add(BorderLayoutPanel().apply { - layout = FlowLayout(FlowLayout.LEFT, 0, 0) - isOpaque = false - add(title) - add(badge) - }, BorderLayout.CENTER) - } - - init { - layout = BorderLayout(UiStyle.Gap.pad(), 0) - border = JBUI.Borders.empty(UiStyle.Gap.lg(), UiStyle.Gap.lg(), UiStyle.Gap.lg(), UiStyle.Gap.lg()) - head.isOpaque = false - add(head, BorderLayout.CENTER) - add(time, BorderLayout.EAST) - } - - override fun getListCellRendererComponent( - list: JList, - value: LocalHistoryItem?, - index: Int, - selected: Boolean, - focus: Boolean, - ): Component { - val over = selected || hover == index - isOpaque = over - background = if (over) list.selectionBackground else list.background - title.foreground = if (over) list.selectionForeground else UIUtil.getLabelForeground() - time.foreground = if (over) list.selectionForeground else UIUtil.getContextHelpForeground() - title.text = value?.let { snapshot.titles[it.id] ?: title(it) } ?: "" - time.text = value?.let(HistoryTime::relative) ?: "" - setBadge(value?.id?.let(snapshot.activity::get)) - return this - } - - private fun setBadge(kind: SessionActivityKind?) { - badge.isVisible = kind != null - badge.icon = kind?.let { FilledBadgeIcon(it.label(), it.bg(), it.fg()) } - } - } - - private inner class ShowHistoryButton : JButton(KiloBundle.message("session.showHistory"), AllIcons.Vcs.History) { + internal open class ShowHistoryButton( + text: String = KiloBundle.message("session.showHistory"), + icon: javax.swing.Icon = AllIcons.Vcs.History, + ) : JButton(text, icon) { private var over = false init { @@ -361,7 +251,7 @@ class EmptySessionPanel( override fun applyStyle(style: SessionEditorStyle) { this.style = style welcomeLabel.font = style.regularFont - recentTitle.font = style.smallFont + recent.titleFont(style.smallFont) revalidate() repaint() } @@ -374,7 +264,3 @@ class EmptySessionPanel( const val ACTIVITY_MS = 3_000 } } - -private fun Map.changed(next: Map) = (keys + next.keys).filterTo(mutableSetOf()) { - this[it] != next[it] -} diff --git a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/RecentsList.kt b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/RecentsList.kt new file mode 100644 index 00000000000..c3205b69cf8 --- /dev/null +++ b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/RecentsList.kt @@ -0,0 +1,198 @@ +package ai.kilocode.client.session.ui.empty + +import ai.kilocode.client.plugin.KiloBundle +import ai.kilocode.client.session.SessionActivityKind +import ai.kilocode.client.session.SessionRef +import ai.kilocode.client.session.controller.SessionController +import ai.kilocode.client.session.history.HistoryActivitySnapshot +import ai.kilocode.client.session.history.HistoryTime +import ai.kilocode.client.session.history.LocalHistoryItem +import ai.kilocode.client.session.history.itemAt +import ai.kilocode.client.session.history.title +import ai.kilocode.client.session.ui.style.SessionUiStyle +import ai.kilocode.client.ui.FilledBadgeIcon +import ai.kilocode.client.ui.UiStyle +import ai.kilocode.rpc.dto.SessionDto +import com.intellij.ui.components.JBLabel +import com.intellij.ui.components.JBList +import com.intellij.util.concurrency.annotations.RequiresEdt +import com.intellij.util.ui.JBUI +import com.intellij.util.ui.UIUtil +import com.intellij.util.ui.components.BorderLayoutPanel +import java.awt.BorderLayout +import java.awt.Component +import java.awt.Cursor +import java.awt.FlowLayout +import java.awt.event.MouseAdapter +import java.awt.event.MouseEvent +import java.awt.event.MouseMotionAdapter +import javax.swing.DefaultListModel +import javax.swing.JList +import javax.swing.ListCellRenderer +import javax.swing.ListSelectionModel + +internal class RecentsList( + sessions: List, + private val controller: SessionController, +) : BorderLayoutPanel() { + private val model = DefaultListModel() + private var hover = -1 + private var snapshot = HistoryActivitySnapshot() + + private val title = JBLabel(KiloBundle.message("session.empty.recent")).apply { + foreground = UIUtil.getContextHelpForeground() + } + + private val list = JBList(model).apply { + isOpaque = false + selectionMode = ListSelectionModel.SINGLE_SELECTION + visibleRowCount = SessionUiStyle.RecentSessions.LIMIT + cellRenderer = Renderer() + cursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR) + emptyText.clear() + addMouseListener(object : MouseAdapter() { + override fun mouseClicked(e: MouseEvent) { + val item = itemAt(this@apply, e) ?: return + controller.openSession(SessionRef.Local(item.session)) + } + + override fun mouseExited(e: MouseEvent) { + hover = -1 + repaint() + } + }) + addMouseMotionListener(object : MouseMotionAdapter() { + override fun mouseMoved(e: MouseEvent) { + val index = index(e) + if (hover == index) return + hover = index + repaint() + } + }) + } + + init { + isOpaque = false + add(title, BorderLayout.NORTH) + add(list, BorderLayout.CENTER) + setSessions(sessions) + } + + fun count() = model.size() + + fun hasSessions() = model.size() > 0 + + fun select(index: Int) { + list.selectedIndex = index + } + + fun selected() = list.selectedIndex + + fun click(index: Int) { + list.selectedIndex = index + controller.openSession(SessionRef.Local(model.getElementAt(index).session)) + } + + fun cursorType() = list.cursor.type + + fun titleFont(font: java.awt.Font) { + title.font = font + } + + fun text(session: SessionDto, now: Long = System.currentTimeMillis()) = + HistoryTime.relative(LocalHistoryItem(session), now) + + fun renderer( + session: SessionDto, + selected: Boolean = false, + hover: Boolean = false, + ): Component { + val old = this.hover + this.hover = if (hover) 0 else -1 + return list.cellRenderer.getListCellRendererComponent(list, LocalHistoryItem(session), 0, selected, false).also { + this.hover = old + } + } + + @RequiresEdt + fun sync(activity: Map, titles: Map) { + val next = HistoryActivitySnapshot(activity, titles) + val changed = snapshot.changed(next) + snapshot = next + repaintRows(changed) + } + + private fun setSessions(sessions: List) { + model.clear() + sessions.take(SessionUiStyle.RecentSessions.LIMIT).map(::LocalHistoryItem).forEach(model::addElement) + revalidate() + repaint() + } + + private fun repaintRows(ids: Set) { + if (ids.isEmpty()) return + repeat(model.size()) { index -> + if (model.getElementAt(index).id !in ids) return@repeat + list.getCellBounds(index, index)?.let(list::repaint) + } + } + + private fun index(e: MouseEvent): Int { + val idx = list.locationToIndex(e.point) + if (idx < 0) return -1 + val box = list.getCellBounds(idx, idx) ?: return -1 + if (!box.contains(e.point)) return -1 + return idx + } + + private inner class Renderer : BorderLayoutPanel(), ListCellRenderer { + private val title = JBLabel() + private val badge = JBLabel().apply { + border = JBUI.Borders.emptyLeft(JBUI.CurrentTheme.ActionsList.elementIconGap()) + } + private val time = JBLabel() + private val head = BorderLayoutPanel().apply { + add(BorderLayoutPanel().apply { + layout = FlowLayout(FlowLayout.LEFT, 0, 0) + isOpaque = false + add(title) + add(badge) + }, BorderLayout.CENTER) + } + + init { + layout = BorderLayout(UiStyle.Gap.pad(), 0) + border = JBUI.Borders.empty(UiStyle.Gap.lg(), UiStyle.Gap.lg(), UiStyle.Gap.lg(), UiStyle.Gap.lg()) + head.isOpaque = false + add(head, BorderLayout.CENTER) + add(time, BorderLayout.EAST) + } + + override fun getListCellRendererComponent( + list: JList, + value: LocalHistoryItem?, + index: Int, + selected: Boolean, + focus: Boolean, + ): Component { + val over = selected || hover == index + isOpaque = over + background = if (over) list.selectionBackground else list.background + title.foreground = if (over) list.selectionForeground else UIUtil.getLabelForeground() + time.foreground = if (over) list.selectionForeground else UIUtil.getContextHelpForeground() + title.text = value?.let { snapshot.titles[it.id] ?: title(it) } ?: "" + time.text = value?.let(HistoryTime::relative) ?: "" + setBadge(value?.id?.let(snapshot.activity::get)) + return this + } + + private fun setBadge(kind: SessionActivityKind?) { + badge.isVisible = kind != null + badge.icon = kind?.let { FilledBadgeIcon(it.label(), it.bg(), it.fg()) } + } + } +} + +private fun Map.changed(next: Map) = (keys + next.keys).filterTo(mutableSetOf()) { + this[it] != next[it] +} diff --git a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/ui/UiStyle.kt b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/ui/UiStyle.kt index 3f9b680cf40..be96983dfbd 100644 --- a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/ui/UiStyle.kt +++ b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/ui/UiStyle.kt @@ -33,6 +33,20 @@ object UiStyle { fun component() = com.intellij.util.ui.JBValue.UIInteger("Component.arc", 8).get() } + /** Platform balloon styling used by lightweight contextual overlays. */ + object Balloon { + fun bg(): Color = UIUtil.getPanelBackground() + + fun border(): Color = JBUI.CurrentTheme.Popup.borderColor(true) + + /** New UI parameter-info balloon insets: symmetric vertical padding with wider sides. */ + fun insets() = JBUI.insets(6, 12, 6, 12) + + fun pointer() = JBUI.size(16, 8) + + fun arc() = JBUI.scale(8) + } + /** Theme-aware colors and color math used by multiple UI surfaces. */ object Colors { fun bg(): Color = UIUtil.getPanelBackground() diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/icons/discord.svg b/packages/kilo-jetbrains/frontend/src/main/resources/icons/discord.svg new file mode 100644 index 00000000000..6b1bcab5732 --- /dev/null +++ b/packages/kilo-jetbrains/frontend/src/main/resources/icons/discord.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/icons/discord_dark.svg b/packages/kilo-jetbrains/frontend/src/main/resources/icons/discord_dark.svg new file mode 100644 index 00000000000..db15066d329 --- /dev/null +++ b/packages/kilo-jetbrains/frontend/src/main/resources/icons/discord_dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle.properties index 96303b3c08a..eeca886cc60 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle.properties @@ -11,6 +11,11 @@ session.account.switcher=Switch account session.empty.loading=Loading... session.empty.recent=RECENT session.showHistory=Show History +feedback.button=Feedback & Support +feedback.dialog.message=We'd love to hear your feedback or help with any issues you're experiencing. +feedback.dialog.github=Report an issue on GitHub +feedback.dialog.discord=Join our Discord community +feedback.dialog.support=Customer Support session.scroll.bottom=Scroll to bottom session.scroll.question=Scroll to question session.tab.new=New Session diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_ar.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_ar.properties index 9cb9ee73187..26ff25a94a3 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_ar.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_ar.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code هو مساعد برمجة بالذكاء الا session.empty.loading=جاري التحميل… session.empty.recent=الحديثة session.showHistory=عرض السجل +feedback.button=التغذية الراجعة والدعم +feedback.dialog.message=يسعدنا سماع تعليقاتك أو مساعدتك في حل أي مشكلات تواجهها. +feedback.dialog.github=الإبلاغ عن مشكلة على GitHub +feedback.dialog.discord=الانضمام إلى مجتمع Discord +feedback.dialog.support=دعم العملاء session.scroll.bottom=التمرير إلى الأسفل session.tab.new=جلسة جديدة session.tab.untitled=جلسة بدون عنوان diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_bs.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_bs.properties index a310da70e8e..df6bad0d4c5 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_bs.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_bs.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code je AI asistent za kodiranje. Zatražite od njega session.empty.loading=Učitavanje… session.empty.recent=NEDAVNO session.showHistory=Prikaži historiju +feedback.button=Povratne informacije i podrška +feedback.dialog.message=Voljeli bismo čuti vaše povratne informacije ili pomoći s problemima koje doživljavate. +feedback.dialog.github=Prijavite problem na GitHubu +feedback.dialog.discord=Pridružite se našoj Discord zajednici +feedback.dialog.support=Korisnička podrška session.scroll.bottom=Skrolaj na dno session.tab.new=Nova sesija session.tab.untitled=Sesija bez naslova diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_da.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_da.properties index 706e2faf0b6..2ad11f62a95 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_da.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_da.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code er en AI-kodningsassistent. Bed den om at bygge session.empty.loading=Indlæser… session.empty.recent=SENESTE session.showHistory=Vis historik +feedback.button=Feedback & support +feedback.dialog.message=Vi vil gerne høre din feedback eller hjælpe med eventuelle problemer, du oplever. +feedback.dialog.github=Rapportér et problem på GitHub +feedback.dialog.discord=Deltag i vores Discord-fællesskab +feedback.dialog.support=Kundesupport session.scroll.bottom=Rul til bunden session.tab.new=Ny session session.tab.untitled=Unavngivet session diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_de.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_de.properties index f604c18c850..47248c351fe 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_de.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_de.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code ist ein KI-Coding-Assistent. Bitten Sie ihn, Fun session.empty.loading=Wird geladen… session.empty.recent=ZULETZT session.showHistory=Verlauf anzeigen +feedback.button=Feedback & Support +feedback.dialog.message=Wir würden uns freuen, Ihr Feedback zu hören oder Ihnen bei Problemen zu helfen. +feedback.dialog.github=Ein Problem auf GitHub melden +feedback.dialog.discord=Unserer Discord-Community beitreten +feedback.dialog.support=Kundensupport session.scroll.bottom=Zum Ende scrollen session.tab.new=Neue Sitzung session.tab.untitled=Unbenannte Sitzung diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_es.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_es.properties index 92fbad3508f..ce418883385 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_es.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_es.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code es un asistente de codificación con IA. Pida qu session.empty.loading=Cargando… session.empty.recent=RECIENTE session.showHistory=Mostrar historial +feedback.button=Comentarios y soporte +feedback.dialog.message=Nos encantaría escuchar tus comentarios o ayudarte con cualquier problema que estés experimentando. +feedback.dialog.github=Reportar un problema en GitHub +feedback.dialog.discord=Unirse a nuestra comunidad de Discord +feedback.dialog.support=Atención al cliente session.scroll.bottom=Desplazarse al final session.tab.new=Nueva sesión session.tab.untitled=Sesión sin título diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_fr.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_fr.properties index bf51dd4e426..27bc8f2a241 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_fr.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_fr.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code est un assistant de codage IA. Demandez-lui de c session.empty.loading=Chargement… session.empty.recent=RÉCENT session.showHistory=Afficher l'historique +feedback.button=Commentaires & support +feedback.dialog.message=Nous aimerions recueillir vos commentaires ou vous aider avec les problèmes que vous rencontrez. +feedback.dialog.github=Signaler un problème sur GitHub +feedback.dialog.discord=Rejoindre notre communauté Discord +feedback.dialog.support=Service client session.scroll.bottom=Faire défiler vers le bas session.tab.new=Nouvelle session session.tab.untitled=Session sans titre diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_ja.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_ja.properties index c32cc633e9f..8d750daf83e 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_ja.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_ja.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo CodeはAIコーディングアシスタントです session.empty.loading=読み込み中… session.empty.recent=最近 session.showHistory=履歴を表示 +feedback.button=フィードバック & サポート +feedback.dialog.message=フィードバックをお聞かせいただくか、問題がある場合はお気軽にご相談ください。 +feedback.dialog.github=GitHubで問題を報告する +feedback.dialog.discord=Discordコミュニティに参加する +feedback.dialog.support=カスタマーサポート session.scroll.bottom=一番下にスクロール session.tab.new=新しいセッション session.tab.untitled=名前なしのセッション diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_ko.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_ko.properties index 893abc95b96..68564e91ac2 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_ko.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_ko.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code는 AI 코딩 어시스턴트입니다. 기능 session.empty.loading=로딩 중… session.empty.recent=최근 session.showHistory=기록 보기 +feedback.button=피드백 & 지원 +feedback.dialog.message=피드백을 들려주시거나 겪고 계신 문제에 대해 도움을 드리고 싶습니다. +feedback.dialog.github=GitHub에 이슈 보고하기 +feedback.dialog.discord=Discord 커뮤니티 참여하기 +feedback.dialog.support=고객 지원 session.scroll.bottom=맨 아래로 스크롤 session.tab.new=새 세션 session.tab.untitled=제목 없는 세션 diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_nl.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_nl.properties index e88d7960997..e7170dd0463 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_nl.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_nl.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code is een AI-codeerassistent. Vraag het om functies session.empty.loading=Laden… session.empty.recent=RECENT session.showHistory=Geschiedenis weergeven +feedback.button=Feedback & Ondersteuning +feedback.dialog.message=We horen graag uw feedback of helpen met eventuele problemen die u ervaart. +feedback.dialog.github=Meld een probleem op GitHub +feedback.dialog.discord=Word lid van onze Discord community +feedback.dialog.support=Klantenservice session.scroll.bottom=Naar beneden scrollen session.tab.new=Nieuwe sessie session.tab.untitled=Naamloze sessie diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_no.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_no.properties index e7631a21d2c..efef3954315 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_no.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_no.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code er en AI-kodingsassistent. Be den om å bygge fu session.empty.loading=Laster… session.empty.recent=NYLIGE session.showHistory=Vis historikk +feedback.button=Tilbakemelding & støtte +feedback.dialog.message=Vi vil gjerne høre tilbakemeldingene dine eller hjelpe med problemer du opplever. +feedback.dialog.github=Rapporter et problem på GitHub +feedback.dialog.discord=Bli med i Discord-fellesskapet vårt +feedback.dialog.support=Kundestøtte session.scroll.bottom=Rull til bunnen session.tab.new=Ny økt session.tab.untitled=Uten tittel diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_pl.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_pl.properties index 53ddeb68b15..19efd536fe2 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_pl.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_pl.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code to asystent kodowania AI. Poproś go o tworzenie session.empty.loading=Ładowanie… session.empty.recent=OSTATNIE session.showHistory=Pokaż historię +feedback.button=Opinie i wsparcie +feedback.dialog.message=Chętnie poznamy Twoją opinię lub pomożemy w przypadku problemów. +feedback.dialog.github=Zgłoś problem na GitHubie +feedback.dialog.discord=Dołącz do naszej społeczności Discord +feedback.dialog.support=Wsparcie klienta session.scroll.bottom=Przewiń na dół session.tab.new=Nowa sesja session.tab.untitled=Sesja bez tytułu diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_pt_BR.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_pt_BR.properties index 27c7eb48436..eb91302e646 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_pt_BR.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_pt_BR.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code é um assistente de codificação com IA. Peça session.empty.loading=Carregando… session.empty.recent=RECENTE session.showHistory=Mostrar histórico +feedback.button=Feedback e suporte +feedback.dialog.message=Adoraríamos ouvir seu feedback ou ajudar com quaisquer problemas que você esteja enfrentando. +feedback.dialog.github=Reportar um problema no GitHub +feedback.dialog.discord=Entrar na nossa comunidade Discord +feedback.dialog.support=Suporte ao cliente session.scroll.bottom=Rolar para o fim session.tab.new=Nova sessão session.tab.untitled=Sessão sem título diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_ru.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_ru.properties index e6bdb4d1c62..f7f0f4f0a7d 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_ru.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_ru.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code — это AI-ассистент по прогр session.empty.loading=Загрузка… session.empty.recent=НЕДАВНИЕ session.showHistory=Показать историю +feedback.button=Отзывы и поддержка +feedback.dialog.message=Мы будем рады услышать ваши отзывы или помочь с любыми возникающими проблемами. +feedback.dialog.github=Сообщить о проблеме на GitHub +feedback.dialog.discord=Присоединиться к нашему Discord +feedback.dialog.support=Служба поддержки session.scroll.bottom=Прокрутить вниз session.tab.new=Новая сессия session.tab.untitled=Незаголовок сессия diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_th.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_th.properties index 049b1e1d1ab..d886db273ef 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_th.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_th.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code คือผู้ช่วยเขียนโ session.empty.loading=กำลังโหลด… session.empty.recent=ล่าสุด session.showHistory=แสดงประวัติ +feedback.button=ข้อเสนอแนะและการสนับสนุน +feedback.dialog.message=เรายินดีรับฟังข้อเสนอแนะของคุณหรือช่วยแก้ไขปัญหาที่คุณพบ +feedback.dialog.github=รายงานปัญหาบน GitHub +feedback.dialog.discord=เข้าร่วมชุมชน Discord ของเรา +feedback.dialog.support=ฝ่ายสนับสนุนลูกค้า session.scroll.bottom=เลื่อนไปด้านล่าง session.tab.new=เซสชันใหม่ session.tab.untitled=เซสชันไม่มีชื่อ diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_tr.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_tr.properties index 096fcb1ee94..b10fe527164 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_tr.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_tr.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code, bir yapay zeka kodlama asistanıdır. Özellik session.empty.loading=Yükleniyor… session.empty.recent=SON session.showHistory=Geçmişi göster +feedback.button=Geri Bildirim ve Destek +feedback.dialog.message=Geri bildiriminizi almaktan veya yaşadığınız sorunlarda yardımcı olmaktan mutluluk duyarız. +feedback.dialog.github=GitHub'da sorun bildirin +feedback.dialog.discord=Discord topluluğumuza katılın +feedback.dialog.support=Müşteri Desteği session.scroll.bottom=En alta kaýr session.tab.new=Yeni oturum session.tab.untitled=Başlıksız oturum diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_uk.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_uk.properties index 73d770b3c05..6d870a273f2 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_uk.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_uk.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code — це AI-асистент для програ session.empty.loading=Завантаження… session.empty.recent=НЕДАВНІ session.showHistory=Показати історію +feedback.button=Зворотний зв'язок і підтримка +feedback.dialog.message=Ми раді отримати ваш відгук або допомогти з будь-якими проблемами, які у вас виникли. +feedback.dialog.github=Повідомити про проблему на GitHub +feedback.dialog.discord=Приєднатися до нашої спільноти Discord +feedback.dialog.support=Служба підтримки клієнтів session.scroll.bottom=Прокрутити донизу session.tab.new=Нова сесія session.tab.untitled=Сесія без назви diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_zh_CN.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_zh_CN.properties index 2288060553f..d7f9efc1326 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_zh_CN.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_zh_CN.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code 是一个 AI 编程助手。可请它构建功 session.empty.loading=加载中… session.empty.recent=最近 session.showHistory=显示历史 +feedback.button=反馈与支持 +feedback.dialog.message=我们很乐意听取您的反馈,或帮助解决您遇到的任何问题。 +feedback.dialog.github=在 GitHub 上报告问题 +feedback.dialog.discord=加入我们的 Discord 社区 +feedback.dialog.support=客户支持 session.scroll.bottom=滚动到底部 session.tab.new=新建会话 session.tab.untitled=无标题会话 diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_zh_TW.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_zh_TW.properties index 40fb78179b3..ae919bc03d6 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_zh_TW.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle_zh_TW.properties @@ -9,6 +9,11 @@ session.empty.welcome=Kilo Code 是 AI 程式輔助。可請它建置功能、 session.empty.loading=載入中… session.empty.recent=最近 session.showHistory=顯示歷史 +feedback.button=意見回饋與支援 +feedback.dialog.message=我們很樂意聆聽您的意見回饋,或協助解決您遇到的任何問題。 +feedback.dialog.github=在 GitHub 上回報問題 +feedback.dialog.discord=加入我們的 Discord 社群 +feedback.dialog.support=客戶支援 session.scroll.bottom=滾動到底部 session.tab.new=新建工作階段 session.tab.untitled=未命名的工作階段 diff --git a/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/SessionUiFactoryTest.kt b/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/SessionUiFactoryTest.kt index 52fb937892c..30160c71c5f 100644 --- a/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/SessionUiFactoryTest.kt +++ b/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/SessionUiFactoryTest.kt @@ -72,7 +72,7 @@ class SessionUiFactoryTest : BasePlatformTestCase() { val rpc = session("ses_1") val ui = SessionUi(project, workspace, sessions, app, scope, manager = manager, workspaces = workspaces) val controller = controller(ui) - val panel = ai.kilocode.client.session.ui.EmptySessionPanel(testRootDisposable, controller, listOf(rpc)) + val panel = ai.kilocode.client.session.ui.empty.EmptySessionPanel(testRootDisposable, controller, listOf(rpc)) panel.clickRecent(0) @@ -84,7 +84,7 @@ class SessionUiFactoryTest : BasePlatformTestCase() { val manager = FakeManager() val ui = SessionUi(project, workspace, sessions, app, scope, manager = manager, workspaces = workspaces) val controller = controller(ui) - val panel = ai.kilocode.client.session.ui.EmptySessionPanel( + val panel = ai.kilocode.client.session.ui.empty.EmptySessionPanel( testRootDisposable, controller, emptyList(), diff --git a/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/SessionUiLayoutTest.kt b/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/SessionUiLayoutTest.kt index 59f5aeb3cd9..fc91e303e1f 100644 --- a/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/SessionUiLayoutTest.kt +++ b/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/SessionUiLayoutTest.kt @@ -8,7 +8,7 @@ import ai.kilocode.client.session.model.QuestionItem import ai.kilocode.client.session.model.QuestionOption import ai.kilocode.client.session.model.SessionState import ai.kilocode.client.session.ui.ConnectionPanel -import ai.kilocode.client.session.ui.EmptySessionPanel +import ai.kilocode.client.session.ui.empty.EmptySessionPanel import ai.kilocode.client.session.ui.LoadingPanel import ai.kilocode.client.session.ui.prompt.PromptPanel import ai.kilocode.client.session.ui.account.SessionAccountOverlay diff --git a/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/EmptySessionPanelTest.kt b/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/EmptySessionPanelTest.kt index 521e678a67d..1514d0d842a 100644 --- a/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/EmptySessionPanelTest.kt +++ b/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/EmptySessionPanelTest.kt @@ -6,11 +6,11 @@ import ai.kilocode.client.app.KiloWorkspaceService import ai.kilocode.client.app.Workspace import ai.kilocode.client.plugin.KiloBundle import ai.kilocode.client.session.SessionActivityKind -import ai.kilocode.client.session.SessionRef import ai.kilocode.client.session.history.HistoryTime import ai.kilocode.client.session.history.LocalHistoryItem -import ai.kilocode.client.session.ui.style.SessionUiStyle import ai.kilocode.client.session.controller.SessionController +import ai.kilocode.client.session.ui.empty.EmptySessionPanel +import ai.kilocode.client.session.ui.style.SessionUiStyle import ai.kilocode.client.ui.FilledBadgeIcon import ai.kilocode.client.testing.FakeAppRpcApi import ai.kilocode.client.testing.FakeSessionRpcApi @@ -33,6 +33,7 @@ import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking import java.awt.BorderLayout import java.awt.Cursor +import javax.swing.JButton @Suppress("UnstableApiUsage") class EmptySessionPanelTest : BasePlatformTestCase() { @@ -82,10 +83,10 @@ class EmptySessionPanelTest : BasePlatformTestCase() { assertFalse(panel.loadingVisible()) } - fun `test recent section remains visible when empty`() { + fun `test recent section is hidden when empty`() { val panel = panel() - assertTrue(panel.recentVisible()) + assertFalse(panel.recentVisible()) assertEquals(0, panel.recentCount()) } @@ -160,11 +161,20 @@ class EmptySessionPanelTest : BasePlatformTestCase() { assertEquals(ai.kilocode.client.plugin.KiloBundle.message("session.showHistory"), panel.showHistoryText()) } + fun `test feedback button uses localized text and icon`() { + val panel = panel() + + assertEquals(KiloBundle.message("feedback.button"), panel.feedbackText()) + assertNotNull(panel.feedbackIcon()) + } + fun `test action controls use hand cursor and no show history outline`() { val panel = panel() assertFalse(panel.showHistoryBorderPainted()) + assertFalse(panel.feedbackBorderPainted()) assertEquals(Cursor.HAND_CURSOR, panel.showHistoryCursor()) + assertEquals(Cursor.HAND_CURSOR, panel.feedbackCursor()) assertEquals(Cursor.HAND_CURSOR, panel.recentCursor()) } @@ -177,6 +187,36 @@ class EmptySessionPanelTest : BasePlatformTestCase() { assertEquals(1, calls) } + fun `test feedback popup content opens expected destinations`() { + val panel = panel() + val opened = mutableListOf() + val content = panel.feedbackContent { opened.add(it) } + val buttons = UIUtil.uiTraverser(content).filter(JButton::class.java).toList() + + assertEquals( + listOf( + KiloBundle.message("feedback.dialog.github"), + KiloBundle.message("feedback.dialog.discord"), + KiloBundle.message("feedback.dialog.support"), + ), + buttons.map { it.text }, + ) + + buttons.forEach { it.doClick() } + + assertEquals(panel.feedbackUrls(), opened) + } + + fun `test feedback discord action has icon`() { + val panel = panel() + val content = panel.feedbackContent() + val discord = UIUtil.uiTraverser(content) + .filter(JButton::class.java) + .first { it.text == KiloBundle.message("feedback.dialog.discord") } + + assertNotNull(discord.icon) + } + fun `test renderer aligns title center and time east`() { val cell = panel().rendererComponent(session("ses_1")) as BorderLayoutPanel val layout = cell.layout as BorderLayout From d437a4d3b5669940e5de1e4aa428f0217d16448b Mon Sep 17 00:00:00 2001 From: kirillk Date: Mon, 1 Jun 2026 17:24:50 -0400 Subject: [PATCH 02/16] refactor(jetbrains): refine empty session feedback UI --- .../session/ui/empty/EmptySessionFeedback.kt | 21 ++++++++++++++----- .../session/ui/empty/EmptySessionPanel.kt | 6 ++---- .../client/session/ui/empty/RecentsList.kt | 18 +++++++++------- .../resources/messages/KiloBundle.properties | 2 +- .../session/ui/EmptySessionPanelTest.kt | 2 +- 5 files changed, 30 insertions(+), 19 deletions(-) diff --git a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionFeedback.kt b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionFeedback.kt index 48ca0fcc3e4..0fb883bd871 100644 --- a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionFeedback.kt +++ b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionFeedback.kt @@ -10,9 +10,11 @@ import com.intellij.icons.AllIcons import com.intellij.openapi.ui.popup.Balloon import com.intellij.openapi.ui.popup.JBPopupFactory import com.intellij.openapi.util.IconLoader +import com.intellij.openapi.util.Disposer import com.intellij.ui.awt.RelativePoint import com.intellij.ui.components.JBLabel import com.intellij.util.concurrency.annotations.RequiresEdt +import com.intellij.util.ui.JBUI import com.intellij.util.ui.UIUtil import com.intellij.xml.util.XmlStringUtil import java.awt.Cursor @@ -25,19 +27,25 @@ import javax.swing.JComponent internal class EmptySessionFeedback( private val browse: (String) -> Unit, ) { + private var balloon: Balloon? = null + val button: JButton = FeedbackButton().apply { addActionListener { popup() } } @RequiresEdt private fun popup() { - lateinit var balloon: Balloon + balloon?.let { + it.hide() + return + } + val content = content { url -> browse(url) - balloon.hide() + balloon?.hide() } - val point = RelativePoint(button, Point(button.width / 2, button.height)) - balloon = JBPopupFactory.getInstance() + val point = RelativePoint(button, Point(button.width / 2, button.height + JBUI.scale(1))) + val popup = JBPopupFactory.getInstance() .createBalloonBuilder(content) .setHideOnClickOutside(true) .setHideOnKeyOutside(true) @@ -50,7 +58,10 @@ internal class EmptySessionFeedback( .setCornerRadius(UiStyle.Balloon.arc()) .createBalloon() - balloon.show(point, Balloon.Position.below) + balloon = popup + popup.setAnimationEnabled(false) + Disposer.register(popup) { balloon = null } + popup.show(point, Balloon.Position.below) } private class FeedbackButton : EmptySessionPanel.ShowHistoryButton(buttonHtml(), AllIcons.Ide.Feedback) diff --git a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionPanel.kt b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionPanel.kt index bd91413f63a..9246b72fcfd 100644 --- a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionPanel.kt +++ b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionPanel.kt @@ -58,7 +58,7 @@ class EmptySessionPanel( private var style = SessionEditorStyle.current() private val timer = Timer(ACTIVITY_MS) { syncActivity() } - private val recent = RecentsList(recents, controller) + internal val recent = RecentsList(recents, controller) private val historyButton = ShowHistoryButton().apply { addActionListener { history() } @@ -162,8 +162,6 @@ class EmptySessionPanel( internal fun showHistoryCursor() = historyButton.cursor.type - internal fun recentCursor() = recent.cursorType() - internal fun recentVisible() = recent.hasSessions() internal fun explanationText() = KiloBundle.message("session.empty.welcome") @@ -251,7 +249,7 @@ class EmptySessionPanel( override fun applyStyle(style: SessionEditorStyle) { this.style = style welcomeLabel.font = style.regularFont - recent.titleFont(style.smallFont) + recent.applyStyle(style) revalidate() repaint() } diff --git a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/RecentsList.kt b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/RecentsList.kt index c3205b69cf8..75380c86918 100644 --- a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/RecentsList.kt +++ b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/RecentsList.kt @@ -9,6 +9,8 @@ import ai.kilocode.client.session.history.HistoryTime import ai.kilocode.client.session.history.LocalHistoryItem import ai.kilocode.client.session.history.itemAt import ai.kilocode.client.session.history.title +import ai.kilocode.client.session.ui.style.SessionEditorStyle +import ai.kilocode.client.session.ui.style.SessionEditorStyleTarget import ai.kilocode.client.session.ui.style.SessionUiStyle import ai.kilocode.client.ui.FilledBadgeIcon import ai.kilocode.client.ui.UiStyle @@ -34,7 +36,7 @@ import javax.swing.ListSelectionModel internal class RecentsList( sessions: List, private val controller: SessionController, -) : BorderLayoutPanel() { +) : BorderLayoutPanel(), SessionEditorStyleTarget { private val model = DefaultListModel() private var hover = -1 private var snapshot = HistoryActivitySnapshot() @@ -43,7 +45,7 @@ internal class RecentsList( foreground = UIUtil.getContextHelpForeground() } - private val list = JBList(model).apply { + internal val list = JBList(model).apply { isOpaque = false selectionMode = ListSelectionModel.SINGLE_SELECTION visibleRowCount = SessionUiStyle.RecentSessions.LIMIT @@ -93,12 +95,6 @@ internal class RecentsList( controller.openSession(SessionRef.Local(model.getElementAt(index).session)) } - fun cursorType() = list.cursor.type - - fun titleFont(font: java.awt.Font) { - title.font = font - } - fun text(session: SessionDto, now: Long = System.currentTimeMillis()) = HistoryTime.relative(LocalHistoryItem(session), now) @@ -122,6 +118,12 @@ internal class RecentsList( repaintRows(changed) } + override fun applyStyle(style: SessionEditorStyle) { + title.font = style.smallFont + revalidate() + repaint() + } + private fun setSessions(sessions: List) { model.clear() sessions.take(SessionUiStyle.RecentSessions.LIMIT).map(::LocalHistoryItem).forEach(model::addElement) diff --git a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle.properties b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle.properties index eeca886cc60..050eee20982 100644 --- a/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle.properties +++ b/packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle.properties @@ -11,7 +11,7 @@ session.account.switcher=Switch account session.empty.loading=Loading... session.empty.recent=RECENT session.showHistory=Show History -feedback.button=Feedback & Support +feedback.button=Feedback and Support feedback.dialog.message=We'd love to hear your feedback or help with any issues you're experiencing. feedback.dialog.github=Report an issue on GitHub feedback.dialog.discord=Join our Discord community diff --git a/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/EmptySessionPanelTest.kt b/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/EmptySessionPanelTest.kt index 1514d0d842a..d0c6f0b0eab 100644 --- a/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/EmptySessionPanelTest.kt +++ b/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/ui/EmptySessionPanelTest.kt @@ -175,7 +175,7 @@ class EmptySessionPanelTest : BasePlatformTestCase() { assertFalse(panel.feedbackBorderPainted()) assertEquals(Cursor.HAND_CURSOR, panel.showHistoryCursor()) assertEquals(Cursor.HAND_CURSOR, panel.feedbackCursor()) - assertEquals(Cursor.HAND_CURSOR, panel.recentCursor()) + assertEquals(Cursor.HAND_CURSOR, panel.recent.list.cursor.type) } fun `test clicking show history delegates callback`() { From cb99e77ca027904ca93d00c78deef72544e6025d Mon Sep 17 00:00:00 2001 From: kirillk Date: Mon, 1 Jun 2026 17:34:09 -0400 Subject: [PATCH 03/16] fix(jetbrains): dispose empty session feedback balloon --- .../client/session/ui/empty/EmptySessionFeedback.kt | 9 +++++++-- .../client/session/ui/empty/EmptySessionPanel.kt | 3 +-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionFeedback.kt b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionFeedback.kt index 0fb883bd871..ad6f79d05bb 100644 --- a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionFeedback.kt +++ b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionFeedback.kt @@ -7,10 +7,11 @@ import ai.kilocode.client.ui.layout.Stack import ai.kilocode.client.ui.layout.VAlign import ai.kilocode.client.ui.layout.align import com.intellij.icons.AllIcons +import com.intellij.openapi.Disposable import com.intellij.openapi.ui.popup.Balloon import com.intellij.openapi.ui.popup.JBPopupFactory -import com.intellij.openapi.util.IconLoader import com.intellij.openapi.util.Disposer +import com.intellij.openapi.util.IconLoader import com.intellij.ui.awt.RelativePoint import com.intellij.ui.components.JBLabel import com.intellij.util.concurrency.annotations.RequiresEdt @@ -26,7 +27,7 @@ import javax.swing.JComponent internal class EmptySessionFeedback( private val browse: (String) -> Unit, -) { +) : Disposable { private var balloon: Balloon? = null val button: JButton = FeedbackButton().apply { @@ -66,6 +67,10 @@ internal class EmptySessionFeedback( private class FeedbackButton : EmptySessionPanel.ShowHistoryButton(buttonHtml(), AllIcons.Ide.Feedback) + override fun dispose() { + balloon?.hide() + } + private class ActionButton(text: String, icon: javax.swing.Icon, action: () -> Unit) : JButton(text, icon) { init { cursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR) diff --git a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionPanel.kt b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionPanel.kt index 9246b72fcfd..29ad9df649f 100644 --- a/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionPanel.kt +++ b/packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/empty/EmptySessionPanel.kt @@ -56,7 +56,6 @@ class EmptySessionPanel( ) : BorderLayoutPanel(), Disposable, SessionEditorStyleTarget { val view: Align = align(HAlign.CENTER, VAlign.CENTER) - private var style = SessionEditorStyle.current() private val timer = Timer(ACTIVITY_MS) { syncActivity() } internal val recent = RecentsList(recents, controller) @@ -90,6 +89,7 @@ class EmptySessionPanel( init { Disposer.register(parent, this) + Disposer.register(this, feedback) isOpaque = false applyStyle(SessionEditorStyle.current()) addHierarchyListener { e -> @@ -247,7 +247,6 @@ class EmptySessionPanel( } override fun applyStyle(style: SessionEditorStyle) { - this.style = style welcomeLabel.font = style.regularFont recent.applyStyle(style) revalidate() From 8bbefb33001c0df5197be01a159fe5134026d838 Mon Sep 17 00:00:00 2001 From: kirillk Date: Mon, 1 Jun 2026 18:02:30 -0400 Subject: [PATCH 04/16] fix(jetbrains): avoid config update SSE race --- .../kotlin/ai/kilocode/backend/app/KiloBackendAppService.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/app/KiloBackendAppService.kt b/packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/app/KiloBackendAppService.kt index 5a0c14126ea..b37041af362 100644 --- a/packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/app/KiloBackendAppService.kt +++ b/packages/kilo-jetbrains/backend/src/main/kotlin/ai/kilocode/backend/app/KiloBackendAppService.kt @@ -23,6 +23,7 @@ import com.intellij.openapi.Disposable import com.intellij.openapi.components.Service import kotlinx.coroutines.CancellationException import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.Job import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.delay @@ -343,6 +344,7 @@ class KiloBackendAppService private constructor( sessions.start(connection.api!!, connection.apiClient!!, connection.port, connection.events) chat.start(connection.apiClient!!, connection.port, connection.events) workspaces.start(connection.api!!, connection.apiClient!!, connection.port, connection.events) + startWatchingGlobalSseEvents() setAppReady( AppData( profile = prof, @@ -352,7 +354,6 @@ class KiloBackendAppService private constructor( ) ) log.info("Application started — config, profile, notifications loaded") - startWatchingGlobalSseEvents() } catch (e: TimeoutCancellationException) { val err = LoadError( resource = "app", @@ -592,7 +593,7 @@ class KiloBackendAppService private constructor( synchronized(loadLock) { if (eventWatcher?.isActive == true) return log.info("Started watching global SSE events (config.updated, disposed)") - eventWatcher = cs.launch { + eventWatcher = cs.launch(start = CoroutineStart.UNDISPATCHED) { connection.events.collect { event -> when (event.type) { "global.config.updated" -> { From 52aa8c0ee37326779b548611aa08744128feca20 Mon Sep 17 00:00:00 2001 From: marius-kilocode Date: Wed, 3 Jun 2026 13:12:20 +0200 Subject: [PATCH 05/16] refactor(vscode): extract shared diff review UI --- .../tests/unit/agent-manager-arch.test.ts | 16 +++++++------- .../unit/agent-manager-diff-state.test.ts | 4 ++-- .../tests/unit/diff-viewer-css-arch.test.ts | 8 +++---- .../kilo-vscode/tests/unit/file-tree.test.ts | 2 +- .../unit/markdown-annotation-layer.test.ts | 2 +- .../tests/unit/review-comments.test.ts | 6 ++--- .../agent-manager/AgentManagerApp.tsx | 8 +++---- .../webview-ui/agent-manager/ApplyDialog.tsx | 2 +- .../webview-ui/agent-manager/DiffPanel.tsx | 22 ++++++++++++------- .../DiffEndMarker.tsx | 0 .../webview-ui/diff-viewer/DiffViewerApp.tsx | 4 ++-- .../FileTree.tsx | 0 .../FullScreenDiffView.tsx | 8 +++---- .../MarkdownAnnotationLayer.tsx | 0 .../MarkdownDiffView.tsx | 0 .../diff-open-policy.ts | 0 .../diff-state.ts | 0 .../file-tree-utils.ts | 0 .../markdown-annotation-mutation.ts | 0 .../markdown-comment-ranges.ts | 0 .../review-annotation-speech.tsx | 0 .../review-annotations.ts | 0 .../review-comments.ts | 0 .../diff-virtual/DiffVirtualApp.tsx | 2 +- .../src/stories/agent-manager.stories.tsx | 4 ++-- 25 files changed, 47 insertions(+), 41 deletions(-) rename packages/kilo-vscode/webview-ui/{agent-manager => diff-viewer}/DiffEndMarker.tsx (100%) rename packages/kilo-vscode/webview-ui/{agent-manager => diff-viewer}/FileTree.tsx (100%) rename packages/kilo-vscode/webview-ui/{agent-manager => diff-viewer}/FullScreenDiffView.tsx (99%) rename packages/kilo-vscode/webview-ui/{agent-manager => diff-viewer}/MarkdownAnnotationLayer.tsx (100%) rename packages/kilo-vscode/webview-ui/{agent-manager => diff-viewer}/MarkdownDiffView.tsx (100%) rename packages/kilo-vscode/webview-ui/{agent-manager => diff-viewer}/diff-open-policy.ts (100%) rename packages/kilo-vscode/webview-ui/{agent-manager => diff-viewer}/diff-state.ts (100%) rename packages/kilo-vscode/webview-ui/{agent-manager => diff-viewer}/file-tree-utils.ts (100%) rename packages/kilo-vscode/webview-ui/{agent-manager => diff-viewer}/markdown-annotation-mutation.ts (100%) rename packages/kilo-vscode/webview-ui/{agent-manager => diff-viewer}/markdown-comment-ranges.ts (100%) rename packages/kilo-vscode/webview-ui/{agent-manager => diff-viewer}/review-annotation-speech.tsx (100%) rename packages/kilo-vscode/webview-ui/{agent-manager => diff-viewer}/review-annotations.ts (100%) rename packages/kilo-vscode/webview-ui/{agent-manager => diff-viewer}/review-comments.ts (100%) diff --git a/packages/kilo-vscode/tests/unit/agent-manager-arch.test.ts b/packages/kilo-vscode/tests/unit/agent-manager-arch.test.ts index a142f5dd81d..9abcb7bb52a 100644 --- a/packages/kilo-vscode/tests/unit/agent-manager-arch.test.ts +++ b/packages/kilo-vscode/tests/unit/agent-manager-arch.test.ts @@ -23,14 +23,14 @@ const TSX_FILES = [ path.join(ROOT, "webview-ui/agent-manager/NewWorktreeDialog.tsx"), path.join(ROOT, "webview-ui/agent-manager/sortable-tab.tsx"), path.join(ROOT, "webview-ui/agent-manager/DiffPanel.tsx"), - path.join(ROOT, "webview-ui/agent-manager/FullScreenDiffView.tsx"), - path.join(ROOT, "webview-ui/agent-manager/MarkdownDiffView.tsx"), - path.join(ROOT, "webview-ui/agent-manager/MarkdownAnnotationLayer.tsx"), - path.join(ROOT, "webview-ui/agent-manager/markdown-comment-ranges.ts"), - path.join(ROOT, "webview-ui/agent-manager/DiffEndMarker.tsx"), - path.join(ROOT, "webview-ui/agent-manager/FileTree.tsx"), - path.join(ROOT, "webview-ui/agent-manager/review-annotations.ts"), - path.join(ROOT, "webview-ui/agent-manager/review-annotation-speech.tsx"), + path.join(ROOT, "webview-ui/diff-viewer/FullScreenDiffView.tsx"), + path.join(ROOT, "webview-ui/diff-viewer/MarkdownDiffView.tsx"), + path.join(ROOT, "webview-ui/diff-viewer/MarkdownAnnotationLayer.tsx"), + path.join(ROOT, "webview-ui/diff-viewer/markdown-comment-ranges.ts"), + path.join(ROOT, "webview-ui/diff-viewer/DiffEndMarker.tsx"), + path.join(ROOT, "webview-ui/diff-viewer/FileTree.tsx"), + path.join(ROOT, "webview-ui/diff-viewer/review-annotations.ts"), + path.join(ROOT, "webview-ui/diff-viewer/review-annotation-speech.tsx"), path.join(ROOT, "webview-ui/agent-manager/MultiModelSelector.tsx"), path.join(ROOT, "webview-ui/agent-manager/ApplyDialog.tsx"), path.join(ROOT, "webview-ui/agent-manager/WorktreeItem.tsx"), diff --git a/packages/kilo-vscode/tests/unit/agent-manager-diff-state.test.ts b/packages/kilo-vscode/tests/unit/agent-manager-diff-state.test.ts index 4c88fdceb7a..8e80715a477 100644 --- a/packages/kilo-vscode/tests/unit/agent-manager-diff-state.test.ts +++ b/packages/kilo-vscode/tests/unit/agent-manager-diff-state.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "bun:test" -import { mergeWorktreeDiffs } from "../../webview-ui/agent-manager/diff-state" +import { mergeWorktreeDiffs } from "../../webview-ui/diff-viewer/diff-state" import { EAGER_DIFF_REVIEW_LINES, EXTREME_DIFF_CHANGED_LINES, @@ -8,7 +8,7 @@ import { expandableOpenFiles, initialOpenFiles, toggleOpenFiles, -} from "../../webview-ui/agent-manager/diff-open-policy" +} from "../../webview-ui/diff-viewer/diff-open-policy" import type { WorktreeFileDiff } from "../../webview-ui/src/types/messages" function diff(overrides: Partial): WorktreeFileDiff { diff --git a/packages/kilo-vscode/tests/unit/diff-viewer-css-arch.test.ts b/packages/kilo-vscode/tests/unit/diff-viewer-css-arch.test.ts index ce6614c519b..f854b92e219 100644 --- a/packages/kilo-vscode/tests/unit/diff-viewer-css-arch.test.ts +++ b/packages/kilo-vscode/tests/unit/diff-viewer-css-arch.test.ts @@ -1,5 +1,5 @@ /** - * Architecture test: FullScreenDiffView CSS co-location. + * Architecture test: FullScreenDiffView CSS imports. * * `FullScreenDiffView` and its children (`FileTree`, etc.) rely on classes * defined in BOTH `agent-manager.css` and `agent-manager-review.css`. The @@ -22,10 +22,10 @@ import fs from "node:fs" import path from "node:path" const ROOT = path.resolve(import.meta.dir, "../..") -const FULL_SCREEN_DIFF_VIEW = path.join(ROOT, "webview-ui/agent-manager/FullScreenDiffView.tsx") -const REQUIRED = ["./agent-manager.css", "./agent-manager-review.css"] as const +const FULL_SCREEN_DIFF_VIEW = path.join(ROOT, "webview-ui/diff-viewer/FullScreenDiffView.tsx") +const REQUIRED = ["../agent-manager/agent-manager.css", "../agent-manager/agent-manager-review.css"] as const -describe("FullScreenDiffView — CSS co-location", () => { +describe("FullScreenDiffView — CSS imports", () => { it("imports every stylesheet required to render correctly", () => { const src = fs.readFileSync(FULL_SCREEN_DIFF_VIEW, "utf-8") const missing = REQUIRED.filter((css) => !src.includes(`import "${css}"`)) diff --git a/packages/kilo-vscode/tests/unit/file-tree.test.ts b/packages/kilo-vscode/tests/unit/file-tree.test.ts index a54908dab20..2f1c066f6d8 100644 --- a/packages/kilo-vscode/tests/unit/file-tree.test.ts +++ b/packages/kilo-vscode/tests/unit/file-tree.test.ts @@ -5,7 +5,7 @@ import { flattenChain, treeOrder, type FileTreeNode, -} from "../../webview-ui/agent-manager/file-tree-utils" +} from "../../webview-ui/diff-viewer/file-tree-utils" import type { WorktreeFileDiff } from "../../webview-ui/src/types/messages" function diff(file: string, status?: "added" | "deleted" | "modified"): WorktreeFileDiff { diff --git a/packages/kilo-vscode/tests/unit/markdown-annotation-layer.test.ts b/packages/kilo-vscode/tests/unit/markdown-annotation-layer.test.ts index 3354e61943c..f69cbdd92b7 100644 --- a/packages/kilo-vscode/tests/unit/markdown-annotation-layer.test.ts +++ b/packages/kilo-vscode/tests/unit/markdown-annotation-layer.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "bun:test" -import { isAnnotationMutation } from "../../webview-ui/agent-manager/markdown-annotation-mutation" +import { isAnnotationMutation } from "../../webview-ui/diff-viewer/markdown-annotation-mutation" function mutation(target: Node): Pick { return { target } diff --git a/packages/kilo-vscode/tests/unit/review-comments.test.ts b/packages/kilo-vscode/tests/unit/review-comments.test.ts index c3602ab1cda..91adacced9c 100644 --- a/packages/kilo-vscode/tests/unit/review-comments.test.ts +++ b/packages/kilo-vscode/tests/unit/review-comments.test.ts @@ -6,8 +6,8 @@ import { getDirectory, getFilename, type ReviewComment, -} from "../../webview-ui/agent-manager/review-comments" -import { markdownCommentBlocks } from "../../webview-ui/agent-manager/markdown-comment-ranges" +} from "../../webview-ui/diff-viewer/review-comments" +import { markdownCommentBlocks } from "../../webview-ui/diff-viewer/markdown-comment-ranges" import { buildFileAnnotations, clearReviewComposer, @@ -17,7 +17,7 @@ import { reviewComposerEdit, reviewDraftSpeechKey, reviewEditSpeechKey, -} from "../../webview-ui/agent-manager/review-annotations" +} from "../../webview-ui/diff-viewer/review-annotations" import type { WorktreeFileDiff } from "../../webview-ui/src/types/messages" function diff(file: string, before: string, after: string): WorktreeFileDiff { diff --git a/packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx b/packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx index 37425b8501d..c29fcf82c08 100644 --- a/packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx +++ b/packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx @@ -103,11 +103,11 @@ import { renderTab, renderTerminalLayer, renderNewTabButton } from "./tab-render import { useTabScroll } from "./tab-scroll" import { DiffPanel } from "./DiffPanel" import { createRevertFile } from "./revert-file" -import { FullScreenDiffView } from "./FullScreenDiffView" +import { FullScreenDiffView } from "../diff-viewer/FullScreenDiffView" import { ApplyDialog } from "./ApplyDialog" import { groupApplyConflicts } from "./apply-conflicts" -import type { ReviewComment } from "./review-comments" -import { clearReviewComposer, createReviewComposer } from "./review-annotations" +import type { ReviewComment } from "../diff-viewer/review-comments" +import { clearReviewComposer, createReviewComposer } from "../diff-viewer/review-annotations" import { CurrentTabsMenu, createCurrentTabItems, focusCurrentTab } from "./CurrentTabsMenu" import { BranchSelect } from "../src/components/shared/BranchSelect" import { WorktreeItem } from "./WorktreeItem" @@ -125,7 +125,7 @@ import { } from "./section-helpers" import { sectionAwareDetector } from "./section-dnd" import { ConstrainDragXAxis } from "./constrain-drag-x" -import { mergeWorktreeDiffs } from "./diff-state" +import { mergeWorktreeDiffs } from "../diff-viewer/diff-state" import { initialMessage, seedInitialVariant } from "./initial-message" import { createMarkdownRender } from "./review-preferences" import { createSidebarCollapse } from "./sidebar-collapse" diff --git a/packages/kilo-vscode/webview-ui/agent-manager/ApplyDialog.tsx b/packages/kilo-vscode/webview-ui/agent-manager/ApplyDialog.tsx index cbce7dbb7ab..b27ff31cdd1 100644 --- a/packages/kilo-vscode/webview-ui/agent-manager/ApplyDialog.tsx +++ b/packages/kilo-vscode/webview-ui/agent-manager/ApplyDialog.tsx @@ -4,7 +4,7 @@ import { Button } from "@kilocode/kilo-ui/button" import { Spinner } from "@kilocode/kilo-ui/spinner" import type { AgentManagerApplyWorktreeDiffStatus, WorktreeFileDiff } from "../src/types/messages" import { useLanguage } from "../src/context/language" -import { FileTree } from "./FileTree" +import { FileTree } from "../diff-viewer/FileTree" import { mapApplyConflictReason, type ApplyConflictRow } from "./apply-conflicts" interface ApplyDialogProps { diff --git a/packages/kilo-vscode/webview-ui/agent-manager/DiffPanel.tsx b/packages/kilo-vscode/webview-ui/agent-manager/DiffPanel.tsx index c32ff8cf607..a0a2bd68c3f 100644 --- a/packages/kilo-vscode/webview-ui/agent-manager/DiffPanel.tsx +++ b/packages/kilo-vscode/webview-ui/agent-manager/DiffPanel.tsx @@ -20,7 +20,13 @@ import { useProvider } from "../src/context/provider" import { useConfig } from "../src/context/config" import { canUseSpeechToText, selectedSpeechToTextModel } from "../src/components/speech-to-text/availability" import { useSpeechToText } from "../src/components/speech-to-text/useSpeechToText" -import { getDirectory, getFilename, lineCount, sanitizeReviewComments, type ReviewComment } from "./review-comments" +import { + getDirectory, + getFilename, + lineCount, + sanitizeReviewComments, + type ReviewComment, +} from "../diff-viewer/review-comments" import { buildFileAnnotations, buildReviewAnnotation, @@ -34,8 +40,8 @@ import { type AnnotationMeta, type ReviewComposer, type ReviewDraft, -} from "./review-annotations" -import { createReviewAnnotationSpeechRenderer } from "./review-annotation-speech" +} from "../diff-viewer/review-annotations" +import { createReviewAnnotationSpeechRenderer } from "../diff-viewer/review-annotation-speech" import { LONG_DIFF_MARKER_FILE_COUNT, allOpenFiles, @@ -43,11 +49,11 @@ import { initialOpenFiles, isLargeDiffFile, toggleOpenFiles, -} from "./diff-open-policy" -import { DiffEndMarker } from "./DiffEndMarker" -import { treeOrder } from "./file-tree-utils" -import { isMarkdownFile, MarkdownDiffView } from "./MarkdownDiffView" -import { createDiffRows, diffToken } from "./diff-state" +} from "../diff-viewer/diff-open-policy" +import { DiffEndMarker } from "../diff-viewer/DiffEndMarker" +import { treeOrder } from "../diff-viewer/file-tree-utils" +import { isMarkdownFile, MarkdownDiffView } from "../diff-viewer/MarkdownDiffView" +import { createDiffRows, diffToken } from "../diff-viewer/diff-state" // --- Data model --- diff --git a/packages/kilo-vscode/webview-ui/agent-manager/DiffEndMarker.tsx b/packages/kilo-vscode/webview-ui/diff-viewer/DiffEndMarker.tsx similarity index 100% rename from packages/kilo-vscode/webview-ui/agent-manager/DiffEndMarker.tsx rename to packages/kilo-vscode/webview-ui/diff-viewer/DiffEndMarker.tsx diff --git a/packages/kilo-vscode/webview-ui/diff-viewer/DiffViewerApp.tsx b/packages/kilo-vscode/webview-ui/diff-viewer/DiffViewerApp.tsx index 795cec3b6eb..a60338c62c3 100644 --- a/packages/kilo-vscode/webview-ui/diff-viewer/DiffViewerApp.tsx +++ b/packages/kilo-vscode/webview-ui/diff-viewer/DiffViewerApp.tsx @@ -11,8 +11,8 @@ import { File } from "@kilocode/kilo-ui/file" import { Icon } from "@kilocode/kilo-ui/icon" import { ThemeProvider } from "@kilocode/kilo-ui/theme" import { Toast } from "@kilocode/kilo-ui/toast" -import { FullScreenDiffView } from "../agent-manager/FullScreenDiffView" -import { mergeWorktreeDiffs } from "../agent-manager/diff-state" +import { FullScreenDiffView } from "./FullScreenDiffView" +import { mergeWorktreeDiffs } from "./diff-state" import { LanguageProvider, useLanguage } from "../src/context/language" import { ServerProvider, useServer } from "../src/context/server" import { ConfigProvider } from "../src/context/config" diff --git a/packages/kilo-vscode/webview-ui/agent-manager/FileTree.tsx b/packages/kilo-vscode/webview-ui/diff-viewer/FileTree.tsx similarity index 100% rename from packages/kilo-vscode/webview-ui/agent-manager/FileTree.tsx rename to packages/kilo-vscode/webview-ui/diff-viewer/FileTree.tsx diff --git a/packages/kilo-vscode/webview-ui/agent-manager/FullScreenDiffView.tsx b/packages/kilo-vscode/webview-ui/diff-viewer/FullScreenDiffView.tsx similarity index 99% rename from packages/kilo-vscode/webview-ui/agent-manager/FullScreenDiffView.tsx rename to packages/kilo-vscode/webview-ui/diff-viewer/FullScreenDiffView.tsx index f0365924ee2..f31eedec301 100644 --- a/packages/kilo-vscode/webview-ui/agent-manager/FullScreenDiffView.tsx +++ b/packages/kilo-vscode/webview-ui/diff-viewer/FullScreenDiffView.tsx @@ -1,9 +1,9 @@ import { type Component, createSignal, createMemo, createEffect, on, onCleanup, For, Show } from "solid-js" -// Styles are co-located with the component so every consumer (sidebar diff viewer, -// agent manager, storybook) picks them up automatically. Do not move these out — +// Styles are imported by the component so every consumer (sidebar diff viewer, +// agent manager, storybook) picks them up automatically. Keep these imports here — // see tests/unit/diff-viewer-css-arch.test.ts for the invariant. -import "./agent-manager.css" -import "./agent-manager-review.css" +import "../agent-manager/agent-manager.css" +import "../agent-manager/agent-manager-review.css" import { Diff } from "@kilocode/kilo-ui/diff" import { Accordion } from "@kilocode/kilo-ui/accordion" import { StickyAccordionHeader } from "@kilocode/kilo-ui/sticky-accordion-header" diff --git a/packages/kilo-vscode/webview-ui/agent-manager/MarkdownAnnotationLayer.tsx b/packages/kilo-vscode/webview-ui/diff-viewer/MarkdownAnnotationLayer.tsx similarity index 100% rename from packages/kilo-vscode/webview-ui/agent-manager/MarkdownAnnotationLayer.tsx rename to packages/kilo-vscode/webview-ui/diff-viewer/MarkdownAnnotationLayer.tsx diff --git a/packages/kilo-vscode/webview-ui/agent-manager/MarkdownDiffView.tsx b/packages/kilo-vscode/webview-ui/diff-viewer/MarkdownDiffView.tsx similarity index 100% rename from packages/kilo-vscode/webview-ui/agent-manager/MarkdownDiffView.tsx rename to packages/kilo-vscode/webview-ui/diff-viewer/MarkdownDiffView.tsx diff --git a/packages/kilo-vscode/webview-ui/agent-manager/diff-open-policy.ts b/packages/kilo-vscode/webview-ui/diff-viewer/diff-open-policy.ts similarity index 100% rename from packages/kilo-vscode/webview-ui/agent-manager/diff-open-policy.ts rename to packages/kilo-vscode/webview-ui/diff-viewer/diff-open-policy.ts diff --git a/packages/kilo-vscode/webview-ui/agent-manager/diff-state.ts b/packages/kilo-vscode/webview-ui/diff-viewer/diff-state.ts similarity index 100% rename from packages/kilo-vscode/webview-ui/agent-manager/diff-state.ts rename to packages/kilo-vscode/webview-ui/diff-viewer/diff-state.ts diff --git a/packages/kilo-vscode/webview-ui/agent-manager/file-tree-utils.ts b/packages/kilo-vscode/webview-ui/diff-viewer/file-tree-utils.ts similarity index 100% rename from packages/kilo-vscode/webview-ui/agent-manager/file-tree-utils.ts rename to packages/kilo-vscode/webview-ui/diff-viewer/file-tree-utils.ts diff --git a/packages/kilo-vscode/webview-ui/agent-manager/markdown-annotation-mutation.ts b/packages/kilo-vscode/webview-ui/diff-viewer/markdown-annotation-mutation.ts similarity index 100% rename from packages/kilo-vscode/webview-ui/agent-manager/markdown-annotation-mutation.ts rename to packages/kilo-vscode/webview-ui/diff-viewer/markdown-annotation-mutation.ts diff --git a/packages/kilo-vscode/webview-ui/agent-manager/markdown-comment-ranges.ts b/packages/kilo-vscode/webview-ui/diff-viewer/markdown-comment-ranges.ts similarity index 100% rename from packages/kilo-vscode/webview-ui/agent-manager/markdown-comment-ranges.ts rename to packages/kilo-vscode/webview-ui/diff-viewer/markdown-comment-ranges.ts diff --git a/packages/kilo-vscode/webview-ui/agent-manager/review-annotation-speech.tsx b/packages/kilo-vscode/webview-ui/diff-viewer/review-annotation-speech.tsx similarity index 100% rename from packages/kilo-vscode/webview-ui/agent-manager/review-annotation-speech.tsx rename to packages/kilo-vscode/webview-ui/diff-viewer/review-annotation-speech.tsx diff --git a/packages/kilo-vscode/webview-ui/agent-manager/review-annotations.ts b/packages/kilo-vscode/webview-ui/diff-viewer/review-annotations.ts similarity index 100% rename from packages/kilo-vscode/webview-ui/agent-manager/review-annotations.ts rename to packages/kilo-vscode/webview-ui/diff-viewer/review-annotations.ts diff --git a/packages/kilo-vscode/webview-ui/agent-manager/review-comments.ts b/packages/kilo-vscode/webview-ui/diff-viewer/review-comments.ts similarity index 100% rename from packages/kilo-vscode/webview-ui/agent-manager/review-comments.ts rename to packages/kilo-vscode/webview-ui/diff-viewer/review-comments.ts diff --git a/packages/kilo-vscode/webview-ui/diff-virtual/DiffVirtualApp.tsx b/packages/kilo-vscode/webview-ui/diff-virtual/DiffVirtualApp.tsx index 6a8614630e2..a9ccfdc1038 100644 --- a/packages/kilo-vscode/webview-ui/diff-virtual/DiffVirtualApp.tsx +++ b/packages/kilo-vscode/webview-ui/diff-virtual/DiffVirtualApp.tsx @@ -16,7 +16,7 @@ import { normalize } from "@kilocode/kilo-ui/session-diff" import { LanguageProvider, useLanguage } from "../src/context/language" import { ServerProvider, useServer } from "../src/context/server" import { getVSCodeAPI, VSCodeProvider } from "../src/context/vscode" -import { isMarkdownFile, MarkdownDiffView } from "../agent-manager/MarkdownDiffView" +import { isMarkdownFile, MarkdownDiffView } from "../diff-viewer/MarkdownDiffView" type DiffStyle = "unified" | "split" diff --git a/packages/kilo-vscode/webview-ui/src/stories/agent-manager.stories.tsx b/packages/kilo-vscode/webview-ui/src/stories/agent-manager.stories.tsx index 36eca47f4af..e2f45756a34 100644 --- a/packages/kilo-vscode/webview-ui/src/stories/agent-manager.stories.tsx +++ b/packages/kilo-vscode/webview-ui/src/stories/agent-manager.stories.tsx @@ -6,9 +6,9 @@ import type { Meta, StoryObj } from "storybook-solidjs-vite" import { StoryProviders } from "./StoryProviders" -import { FileTree } from "../../agent-manager/FileTree" +import { FileTree } from "../../diff-viewer/FileTree" import { DiffPanel } from "../../agent-manager/DiffPanel" -import { FullScreenDiffView } from "../../agent-manager/FullScreenDiffView" +import { FullScreenDiffView } from "../../diff-viewer/FullScreenDiffView" import { WorktreeItem } from "../../agent-manager/WorktreeItem" import { Button } from "@kilocode/kilo-ui/button" import { IconButton } from "@kilocode/kilo-ui/icon-button" From 99407ef83bf2c247578a5b9bcf625bedcec2cfa7 Mon Sep 17 00:00:00 2001 From: marius-kilocode Date: Wed, 3 Jun 2026 13:18:18 +0200 Subject: [PATCH 06/16] fix(ci): cap stalled unit jobs at 45 minutes --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a90022ec66e..c9301c042d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,6 +32,7 @@ jobs: - name: windows host: blacksmith-4vcpu-windows-2025 # kilocode_change runs-on: ${{ matrix.settings.host }} + timeout-minutes: 45 # kilocode_change defaults: run: shell: bash From 02f226d418f4b926b066a648cfc098054af0672d Mon Sep 17 00:00:00 2001 From: marius-kilocode Date: Wed, 3 Jun 2026 13:23:24 +0200 Subject: [PATCH 07/16] chore(ci): remove workflow change marker --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c9301c042d3..1d1ba42008e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,7 @@ jobs: - name: windows host: blacksmith-4vcpu-windows-2025 # kilocode_change runs-on: ${{ matrix.settings.host }} - timeout-minutes: 45 # kilocode_change + timeout-minutes: 45 defaults: run: shell: bash From a0c91eb07ab4d29aa170148c714756ee9286dc86 Mon Sep 17 00:00:00 2001 From: marius-kilocode Date: Wed, 3 Jun 2026 13:25:36 +0200 Subject: [PATCH 08/16] fix(ci): restore workflow change annotation --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d1ba42008e..c9301c042d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,7 @@ jobs: - name: windows host: blacksmith-4vcpu-windows-2025 # kilocode_change runs-on: ${{ matrix.settings.host }} - timeout-minutes: 45 + timeout-minutes: 45 # kilocode_change defaults: run: shell: bash From fc4cf10b0a65ec2b2949dd695ebec6ebb619cd15 Mon Sep 17 00:00:00 2001 From: marius-kilocode Date: Wed, 3 Jun 2026 13:36:08 +0200 Subject: [PATCH 09/16] fix(sdk): preserve nullable Kilo gateway fields --- .changeset/nullable-kilo-gateway-sdk.md | 5 + .../src/kilocode/server/httpapi/public.ts | 20 +++ .../kilocode/server/httpapi-public.test.ts | 29 ++++ packages/sdk/js/src/v2/gen/types.gen.ts | 19 +-- packages/sdk/openapi.json | 148 +++++++++++++----- 5 files changed, 173 insertions(+), 48 deletions(-) create mode 100644 .changeset/nullable-kilo-gateway-sdk.md diff --git a/.changeset/nullable-kilo-gateway-sdk.md b/.changeset/nullable-kilo-gateway-sdk.md new file mode 100644 index 00000000000..3b9c4b0b8c9 --- /dev/null +++ b/.changeset/nullable-kilo-gateway-sdk.md @@ -0,0 +1,5 @@ +--- +"@kilocode/sdk": patch +--- + +Preserve nullable Kilo gateway response fields in the generated TypeScript SDK. diff --git a/packages/opencode/src/kilocode/server/httpapi/public.ts b/packages/opencode/src/kilocode/server/httpapi/public.ts index 5de2211d033..78deb6d62b2 100644 --- a/packages/opencode/src/kilocode/server/httpapi/public.ts +++ b/packages/opencode/src/kilocode/server/httpapi/public.ts @@ -49,6 +49,26 @@ export function matchLegacyKiloOpenApi(input: Record) { const props = ref ? spec.components?.schemas?.[ref]?.properties : body?.properties if (props?.organizationId) props.organizationId = nullable(props.organizationId) + const json = (path: string) => spec.paths?.[path]?.get?.responses?.["200"]?.content?.["application/json"] + const profile = json("/kilo/profile")?.schema?.properties + if (profile?.balance) profile.balance = nullable(profile.balance) + if (profile?.currentOrgId) profile.currentOrgId = nullable(profile.currentOrgId) + + const sessions = json("/kilo/cloud-sessions")?.schema?.properties + const session = sessions?.cliSessions?.items?.properties + if (session?.title) session.title = nullable(session.title) + if (sessions?.nextCursor) sessions.nextCursor = nullable(sessions.nextCursor) + + const claw = json("/kilo/claw/status")?.schema?.properties + if (claw?.status) claw.status = nullable(claw.status) + if (claw?.openclawVersion) claw.openclawVersion = nullable(claw.openclawVersion) + if (claw?.lastStartedAt) claw.lastStartedAt = nullable(claw.lastStartedAt) + if (claw?.lastStoppedAt) claw.lastStoppedAt = nullable(claw.lastStoppedAt) + if (claw?.botName) claw.botName = nullable(claw.botName) + + const credentials = json("/kilo/claw/chat-credentials") + if (credentials?.schema) credentials.schema = nullable(credentials.schema) + const provider = spec.components?.schemas?.Config?.properties?.provider if (provider?.additionalProperties && typeof provider.additionalProperties === "object") provider.additionalProperties = nullable(provider.additionalProperties) diff --git a/packages/opencode/test/kilocode/server/httpapi-public.test.ts b/packages/opencode/test/kilocode/server/httpapi-public.test.ts index 979ed653bc7..1dc4ee7ffb0 100644 --- a/packages/opencode/test/kilocode/server/httpapi-public.test.ts +++ b/packages/opencode/test/kilocode/server/httpapi-public.test.ts @@ -6,6 +6,7 @@ import { PublicApi } from "../../../src/server/routes/instance/httpapi/public" type Schema = { anyOf?: Schema[] + items?: Schema properties?: Record type?: string minLength?: number @@ -51,6 +52,34 @@ describe("Kilo PublicApi OpenAPI contract", () => { expect(props?.organizationId).toEqual({ anyOf: [{ type: "string" }, { type: "null" }] }) }) + test("keeps Kilo gateway responses nullable", () => { + const spec = OpenApi.fromApi(PublicApi) + const response = (path: string) => { + const body = spec.paths[path]?.get?.responses?.["200"] as Body | undefined + return body?.content?.["application/json"]?.schema + } + + const profile = response(KiloGatewayPaths.profile)?.properties + expect(profile?.balance).toEqual({ anyOf: [expect.objectContaining({ type: "object" }), { type: "null" }] }) + expect(profile?.currentOrgId).toEqual({ anyOf: [{ type: "string" }, { type: "null" }] }) + + const sessions = response(KiloGatewayPaths.cloudSessions)?.properties + expect(sessions?.cliSessions?.items?.properties?.title).toEqual({ + anyOf: [{ type: "string" }, { type: "null" }], + }) + expect(sessions?.nextCursor).toEqual({ anyOf: [{ type: "string" }, { type: "null" }] }) + + const claw = response(KiloGatewayPaths.clawStatus)?.properties + expect(claw?.status).toEqual({ anyOf: [expect.objectContaining({ type: "string" }), { type: "null" }] }) + for (const field of ["openclawVersion", "lastStartedAt", "lastStoppedAt", "botName"]) { + expect(claw?.[field]).toEqual({ anyOf: [{ type: "string" }, { type: "null" }] }) + } + + expect(response(KiloGatewayPaths.clawChatCredentials)).toEqual({ + anyOf: [expect.objectContaining({ type: "object" }), { type: "null" }], + }) + }) + test("keeps transcription prompts in the public contract", () => { const spec = OpenApi.fromApi(PublicApi) const body = spec.paths[KiloGatewayPaths.audioTranscriptions]?.post?.requestBody as Body | undefined diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index a0fb916a27b..f5bc92b87ca 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -8268,8 +8268,8 @@ export type KiloProfileResponses = { } balance: { balance: number - } - currentOrgId: string + } | null + currentOrgId: string | null } } @@ -8557,19 +8557,20 @@ export type KiloClawStatusResponses = { | "stopped" | "destroying" | "restoring" + | null sandboxId?: string flyRegion?: string machineSize?: { cpus: number memory_mb: number } - openclawVersion?: string - lastStartedAt?: string - lastStoppedAt?: string + openclawVersion?: string | null + lastStartedAt?: string | null + lastStoppedAt?: string | null channelCount?: number secretCount?: number userId?: string - botName?: string + botName?: string | null } } @@ -8594,7 +8595,7 @@ export type KiloClawChatCredentialsResponses = { expiresAt: string kiloChatUrl: string eventServiceUrl: string - } + } | null } export type KiloClawChatCredentialsResponse = KiloClawChatCredentialsResponses[keyof KiloClawChatCredentialsResponses] @@ -8628,12 +8629,12 @@ export type KiloCloudSessionsResponses = { 200: { cliSessions: Array<{ session_id: string - title: string + title: string | null created_at: string updated_at: string version: number }> - nextCursor: string + nextCursor: string | null } } diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json index 66750773bfb..294c6526d43 100644 --- a/packages/sdk/openapi.json +++ b/packages/sdk/openapi.json @@ -10950,17 +10950,31 @@ "additionalProperties": false }, "balance": { - "type": "object", - "properties": { - "balance": { - "type": "number" + "anyOf": [ + { + "type": "object", + "properties": { + "balance": { + "type": "number" + } + }, + "required": ["balance"], + "additionalProperties": false + }, + { + "type": "null" } - }, - "required": ["balance"], - "additionalProperties": false + ] }, "currentOrgId": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["profile", "balance", "currentOrgId"], @@ -11712,16 +11726,23 @@ "type": "object", "properties": { "status": { - "type": "string", - "enum": [ - "provisioned", - "starting", - "restarting", - "recovering", - "running", - "stopped", - "destroying", - "restoring" + "anyOf": [ + { + "type": "string", + "enum": [ + "provisioned", + "starting", + "restarting", + "recovering", + "running", + "stopped", + "destroying", + "restoring" + ] + }, + { + "type": "null" + } ] }, "sandboxId": { @@ -11744,13 +11765,34 @@ "additionalProperties": false }, "openclawVersion": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "lastStartedAt": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "lastStoppedAt": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "channelCount": { "type": "number" @@ -11762,7 +11804,14 @@ "type": "string" }, "botName": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["status"], @@ -11821,23 +11870,30 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "token": { - "type": "string" + "anyOf": [ + { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "expiresAt": { + "type": "string" + }, + "kiloChatUrl": { + "type": "string" + }, + "eventServiceUrl": { + "type": "string" + } + }, + "required": ["token", "expiresAt", "kiloChatUrl", "eventServiceUrl"], + "additionalProperties": false }, - "expiresAt": { - "type": "string" - }, - "kiloChatUrl": { - "type": "string" - }, - "eventServiceUrl": { - "type": "string" + { + "type": "null" } - }, - "required": ["token", "expiresAt", "kiloChatUrl", "eventServiceUrl"], - "additionalProperties": false + ] } } } @@ -11916,7 +11972,14 @@ "type": "string" }, "title": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "created_at": { "type": "string" @@ -11933,7 +11996,14 @@ } }, "nextCursor": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": ["cliSessions", "nextCursor"], From 35aa9bbbb38557df292f105fd5324bf37807f518 Mon Sep 17 00:00:00 2001 From: marius-kilocode Date: Wed, 3 Jun 2026 13:40:55 +0200 Subject: [PATCH 10/16] fix(cli): restore Kilo Gateway next edit proxying --- .changeset/restore-mercury-next-edit.md | 5 + .../server/httpapi/handlers/kilo-gateway.ts | 52 +++-- .../server/httpapi-exercise-scenarios.ts | 2 +- .../kilocode/server/httpapi-kilo-edit.test.ts | 221 ++++++++++++++++++ 4 files changed, 263 insertions(+), 17 deletions(-) create mode 100644 .changeset/restore-mercury-next-edit.md create mode 100644 packages/opencode/test/kilocode/server/httpapi-kilo-edit.test.ts diff --git a/.changeset/restore-mercury-next-edit.md b/.changeset/restore-mercury-next-edit.md new file mode 100644 index 00000000000..1ed5c75bb5b --- /dev/null +++ b/.changeset/restore-mercury-next-edit.md @@ -0,0 +1,5 @@ +--- +"@kilocode/cli": patch +--- + +Restore Kilo Gateway-backed Mercury Next Edit completions. diff --git a/packages/opencode/src/kilocode/server/httpapi/handlers/kilo-gateway.ts b/packages/opencode/src/kilocode/server/httpapi/handlers/kilo-gateway.ts index e77bebef2c3..31bddc82b67 100644 --- a/packages/opencode/src/kilocode/server/httpapi/handlers/kilo-gateway.ts +++ b/packages/opencode/src/kilocode/server/httpapi/handlers/kilo-gateway.ts @@ -158,14 +158,17 @@ export const kiloGatewayHandlers = HttpApiBuilder.group(InstanceHttpApi, "kilo", const edit = Effect.fn("KiloGatewayHttpApi.edit")(function* (ctx: { payload: typeof EditBody.Type }) { const target = resolveEditTarget(ctx.payload.provider, ctx.payload.model) - if (target.provider !== "inception") { + if (target.provider === "kilo" && !target.url) { return yield* Effect.fail(new HttpApiError.BadRequest({})) } + const proxy = target.provider === "kilo" ? yield* proxyAuth() : undefined const token = yield* Effect.gen(function* () { + if (target.provider === "kilo") return proxy?.token const item = yield* auth.get(target.provider).pipe(Effect.mapError(() => new HttpApiError.Unauthorized({}))) if (item?.type === "api") return item.key return DIRECT_EDIT_ENV[target.provider].map((key) => process.env[key]).find(Boolean) }) + if (target.provider === "kilo" && !proxy?.auth) return yield* Effect.fail(new HttpApiError.Unauthorized({})) if (!token) return yield* Effect.fail(new HttpApiError.Unauthorized({})) const request = yield* HttpServerRequest.HttpServerRequest @@ -188,27 +191,44 @@ export const kiloGatewayHandlers = HttpApiBuilder.group(InstanceHttpApi, "kilo", }) const response = yield* Effect.promise(async () => { - return fetch(target.url, { - method: "POST", - headers: { - "Content-Type": "application/json", - Authorization: `Bearer ${token}`, - }, - signal, - body: JSON.stringify({ - model: target.model, - max_tokens: ctx.payload.maxTokens ?? 512, - // Mercury rejects role:"system" on this endpoint — must be a single user message. - messages: [{ role: "user", content }], - }), - }) + try { + return await fetch(target.url, { + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + ...(target.provider === "kilo" + ? buildKiloHeaders(undefined, { kilocodeOrganizationId: proxy?.organizationId }) + : {}), + ...(target.provider === "kilo" ? { [HEADER_FEATURE]: "autocomplete" } : {}), + }, + signal, + body: JSON.stringify({ + model: target.model, + max_tokens: ctx.payload.maxTokens ?? 512, + // Mercury rejects role:"system" on this endpoint — must be a single user message. + messages: [{ role: "user", content }], + }), + }) + } catch (err) { + if (err instanceof DOMException && err.name === "TimeoutError") + return Response.json({ error: "Edit request timed out" }, { status: 504 }) + if (signal.aborted) return Response.json({ error: "Edit request canceled" }, { status: 499 }) + throw err + } }) if (!response.ok) { // Pass the upstream status through (mirrors the FIM handler) so the // client can distinguish auth/credit/rate-limit/server failures // instead of collapsing everything to 400. - const text = yield* Effect.promise(() => response.text()) + const text = yield* Effect.promise(async () => { + try { + return await response.text() + } catch { + return "" + } + }) return HttpServerResponse.jsonUnsafe( { error: `Edit request failed: ${response.status} ${text}` }, { status: response.status }, diff --git a/packages/opencode/test/kilocode/server/httpapi-exercise-scenarios.ts b/packages/opencode/test/kilocode/server/httpapi-exercise-scenarios.ts index 232f483f4f3..4c89dbb863f 100644 --- a/packages/opencode/test/kilocode/server/httpapi-exercise-scenarios.ts +++ b/packages/opencode/test/kilocode/server/httpapi-exercise-scenarios.ts @@ -141,7 +141,7 @@ export const kiloScenarios: Scenario[] = [ http.protected .post("/kilo/edit", "kilo.edit") .at((ctx) => ({ path: "/kilo/edit", headers: ctx.headers(), body: edit })) - .status(400), + .status(401), http.protected .post("/kilo/audio/transcriptions", "kilo.audio.transcriptions") .at((ctx) => ({ diff --git a/packages/opencode/test/kilocode/server/httpapi-kilo-edit.test.ts b/packages/opencode/test/kilocode/server/httpapi-kilo-edit.test.ts new file mode 100644 index 00000000000..2223330b29b --- /dev/null +++ b/packages/opencode/test/kilocode/server/httpapi-kilo-edit.test.ts @@ -0,0 +1,221 @@ +import { afterEach, describe, expect, spyOn, test } from "bun:test" +import { ConfigProvider, Layer } from "effect" +import { HttpRouter } from "effect/unstable/http" +import { HEADER_FEATURE, HEADER_ORGANIZATIONID } from "@kilocode/kilo-gateway" +import * as Log from "@opencode-ai/core/util/log" +import { KiloGatewayPaths } from "../../../src/kilocode/server/httpapi/groups/kilo-gateway" +import { ExperimentalHttpApiServer } from "../../../src/server/routes/instance/httpapi/server" +import { resetDatabase } from "../../fixture/db" +import { disposeAllInstances, tmpdir } from "../../fixture/fixture" + +void Log.init({ print: false }) + +const env = { + KILO_AUTH_CONTENT: process.env.KILO_AUTH_CONTENT, + INCEPTION_API_KEY: process.env.INCEPTION_API_KEY, +} + +const edit = { + provider: "kilo", + model: "inception/mercury-next-edit", + currentFilePath: "src/index.ts", + currentFileContent: "export const value = 1\n", + cursorLine: 0, + cursorCharacter: 0, + editableRegionStartLine: 0, + editableRegionEndLine: 0, + recentlyViewedSnippets: [], + editDiffHistory: [], +} + +function app() { + const handler = HttpRouter.toWebHandler( + ExperimentalHttpApiServer.routes.pipe(Layer.provide(ConfigProvider.layer(ConfigProvider.fromUnknown({})))), + { disableLogger: true }, + ).handler + + return { + request(input: string | URL | Request, init?: RequestInit) { + return handler( + input instanceof Request ? input : new Request(new URL(input, "http://localhost"), init), + ExperimentalHttpApiServer.context, + ) + }, + } +} + +async function send(body: Record = edit, signal?: AbortSignal) { + await using tmp = await tmpdir({ git: true, config: { formatter: false, lsp: false } }) + return app().request(KiloGatewayPaths.edit, { + method: "POST", + headers: { "content-type": "application/json", "x-kilo-directory": tmp.path }, + body: JSON.stringify(body), + signal, + }) +} + +function stub(run: (input: RequestInfo | URL, init?: RequestInit) => Promise) { + const fetch: typeof globalThis.fetch = Object.assign(run, { preconnect: globalThis.fetch.preconnect }) + return spyOn(globalThis, "fetch").mockImplementation(fetch) +} + +function url(input: RequestInfo | URL) { + if (typeof input === "string") return input + if (input instanceof URL) return input.href + return input.url +} + +function completion(input: RequestInfo | URL) { + return url(input).endsWith("/edit/completions") +} + +function authenticate() { + process.env.KILO_AUTH_CONTENT = JSON.stringify({ + kilo: { + type: "oauth", + refresh: "refresh-token", + access: "gateway-token", + expires: Date.now() + 60_000, + accountId: "org-1", + }, + }) +} + +function restore() { + for (const [key, value] of Object.entries(env)) { + if (value === undefined) delete process.env[key] + else process.env[key] = value + } +} + +afterEach(async () => { + restore() + await disposeAllInstances() + await resetDatabase() +}) + +describe("HttpApi Kilo next edit", () => { + test("requires Kilo Gateway authentication for the Kilo-backed model", async () => { + process.env.KILO_AUTH_CONTENT = "{}" + expect((await send()).status).toBe(401) + }) + + test("rejects non-edit placeholder targets", async () => { + process.env.KILO_AUTH_CONTENT = "{}" + expect((await send({ ...edit, model: "mistralai/codestral-2508" })).status).toBe(400) + }) + + test("proxies Kilo-backed edits with gateway auth and autocomplete headers", async () => { + authenticate() + const calls: Array<{ input: RequestInfo | URL; init?: RequestInit }> = [] + const mock = stub(async (input, init) => { + if (!completion(input)) return Response.json([]) + calls.push({ input, init }) + return Response.json({ + choices: [{ message: { content: "```typescript\nexport const value = 2\n```" } }], + usage: { prompt_tokens: 12, completion_tokens: 6 }, + }) + }) + + try { + const response = await send() + expect(response.status).toBe(200) + expect(await response.json()).toEqual({ + content: "export const value = 2", + usage: { prompt_tokens: 12, completion_tokens: 6 }, + }) + expect(calls).toHaveLength(1) + const call = calls[0] + if (!call) throw new Error("missing edit request") + expect(url(call.input)).toEndWith("/api/edit/completions") + const headers = new Headers(call.init?.headers) + expect(headers.get("authorization")).toBe("Bearer gateway-token") + expect(headers.get(HEADER_ORGANIZATIONID)).toBe("org-1") + expect(headers.get(HEADER_FEATURE)).toBe("autocomplete") + if (typeof call.init?.body !== "string") throw new Error("missing edit request body") + const body: unknown = JSON.parse(call.init.body) + expect(body).toMatchObject({ model: "inception/mercury-edit-2", messages: [{ role: "user" }] }) + } finally { + mock.mockRestore() + } + }) + + test("preserves direct Inception BYOK edits", async () => { + process.env.KILO_AUTH_CONTENT = "{}" + process.env.INCEPTION_API_KEY = "inception-token" + const calls: Array<{ input: RequestInfo | URL; init?: RequestInit }> = [] + const mock = stub(async (input, init) => { + if (!completion(input)) return Response.json([]) + calls.push({ input, init }) + return Response.json({ choices: [{ message: { content: "```\nconst value = 2\n```" } }] }) + }) + + try { + const response = await send({ ...edit, provider: "inception", model: "mercury-next-edit" }) + expect(response.status).toBe(200) + expect(await response.json()).toEqual({ content: "const value = 2", usage: null }) + const call = calls[0] + if (!call) throw new Error("missing edit request") + expect(url(call.input)).toBe("https://api.inceptionlabs.ai/v1/edit/completions") + const headers = new Headers(call.init?.headers) + expect(headers.get("authorization")).toBe("Bearer inception-token") + expect(headers.get(HEADER_ORGANIZATIONID)).toBeNull() + expect(headers.get(HEADER_FEATURE)).toBeNull() + } finally { + mock.mockRestore() + } + }) + + test("passes upstream statuses through when the error body is unreadable", async () => { + authenticate() + const mock = stub(async (input) => { + if (!completion(input)) return Response.json([]) + return new Response( + new ReadableStream({ + start(controller) { + controller.error(new Error("broken upstream body")) + }, + }), + { status: 502 }, + ) + }) + + try { + const response = await send() + expect(response.status).toBe(502) + expect(await response.json()).toEqual({ error: "Edit request failed: 502 " }) + } finally { + mock.mockRestore() + } + }) + + test("maps upstream timeouts to 504", async () => { + authenticate() + const mock = stub(async (input) => { + if (!completion(input)) return Response.json([]) + throw new DOMException("timed out", "TimeoutError") + }) + + try { + expect((await send()).status).toBe(504) + } finally { + mock.mockRestore() + } + }) + + test("maps request cancellation to 499", async () => { + authenticate() + const controller = new AbortController() + const mock = stub(async (input) => { + if (!completion(input)) return Response.json([]) + controller.abort() + throw new DOMException("canceled", "AbortError") + }) + + try { + expect((await send(edit, controller.signal)).status).toBe(499) + } finally { + mock.mockRestore() + } + }) +}) From 9c561074b624925d14ee0e7d9e64d0a6f5958531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Catriel=20M=C3=BCller?= Date: Wed, 3 Jun 2026 08:58:17 -0300 Subject: [PATCH 11/16] feat(cli): add animated console loading screens --- .changeset/console-loading-logo.md | 5 ++ bun.lock | 3 ++ packages/kilo-console/package.json | 1 + packages/kilo-console/public/logo.lottie | Bin 0 -> 32127 bytes .../src/components/LoadingLogo.tsx | 34 +++++++++++++ .../src/components/LoadingScreen.tsx | 20 ++++++++ .../kilo-console/src/layouts/ConfigLayout.tsx | 5 +- .../routes/projects/ProjectConsoleRoute.tsx | 9 ++-- .../src/routes/projects/ProjectsRoute.tsx | 9 ++-- packages/kilo-console/src/styles.css | 1 + packages/kilo-console/src/styles/loading.css | 46 ++++++++++++++++++ 11 files changed, 118 insertions(+), 15 deletions(-) create mode 100644 .changeset/console-loading-logo.md create mode 100644 packages/kilo-console/public/logo.lottie create mode 100644 packages/kilo-console/src/components/LoadingLogo.tsx create mode 100644 packages/kilo-console/src/components/LoadingScreen.tsx create mode 100644 packages/kilo-console/src/styles/loading.css diff --git a/.changeset/console-loading-logo.md b/.changeset/console-loading-logo.md new file mode 100644 index 00000000000..d39b44da157 --- /dev/null +++ b/.changeset/console-loading-logo.md @@ -0,0 +1,5 @@ +--- +"@kilocode/cli": patch +--- + +Show the animated Kilo logo while the console and dashboard finish loading. diff --git a/bun.lock b/bun.lock index 3938c57547f..a921861a7d9 100644 --- a/bun.lock +++ b/bun.lock @@ -85,6 +85,7 @@ "dependencies": { "@kilocode/kilo-web-ui": "workspace:*", "@kilocode/sdk": "workspace:*", + "@lottiefiles/dotlottie-web": "0.74.0", "@opencode-ai/ui": "workspace:*", "@solidjs/router": "catalog:", "ghostty-web": "0.4.0", @@ -1354,6 +1355,8 @@ "@leichtgewicht/ip-codec": ["@leichtgewicht/ip-codec@2.0.5", "", {}, "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw=="], + "@lottiefiles/dotlottie-web": ["@lottiefiles/dotlottie-web@0.74.0", "", {}, "sha512-rG12+dJSVhQDdleGr9epR7zU/UJ6hh8jzBDHAurClHP5t5dSrOh3eP3UCFxolpVPcobaRVYsBnYg4HQokQewpg=="], + "@lukeed/ms": ["@lukeed/ms@2.0.2", "", {}, "sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA=="], "@lydell/node-pty": ["@lydell/node-pty@1.2.0-beta.10", "", { "optionalDependencies": { "@lydell/node-pty-darwin-arm64": "1.2.0-beta.10", "@lydell/node-pty-darwin-x64": "1.2.0-beta.10", "@lydell/node-pty-linux-arm64": "1.2.0-beta.10", "@lydell/node-pty-linux-x64": "1.2.0-beta.10", "@lydell/node-pty-win32-arm64": "1.2.0-beta.10", "@lydell/node-pty-win32-x64": "1.2.0-beta.10" } }, "sha512-Fv+A3+MZVA8qhkBIZsM1E6dCdHNMyXXz22mAYiMWd03LlyK///F3OH6CKPX9mj4id7LUlxpr45yPzyBVy9aDPw=="], diff --git a/packages/kilo-console/package.json b/packages/kilo-console/package.json index 45539070c38..74cefc973bc 100644 --- a/packages/kilo-console/package.json +++ b/packages/kilo-console/package.json @@ -13,6 +13,7 @@ "dependencies": { "@kilocode/kilo-web-ui": "workspace:*", "@kilocode/sdk": "workspace:*", + "@lottiefiles/dotlottie-web": "0.74.0", "@opencode-ai/ui": "workspace:*", "@solidjs/router": "catalog:", "ghostty-web": "0.4.0", diff --git a/packages/kilo-console/public/logo.lottie b/packages/kilo-console/public/logo.lottie new file mode 100644 index 0000000000000000000000000000000000000000..d16c02faf118d5acfd49a1537a4a48dbe3552d38 GIT binary patch literal 32127 zcmZsiLy#!I&bG(4ZQHhO+qUgFW81cE+cwYGHveFSyw0s=2z+U zBV(YeC@`YHM3a@C@8qOh-u%e#PHFEWTSbu$0RXu4yYg)um7TZw<@~$ zjzzfI``7?G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x1B)wCHHgI$ z-Tfc|?OdP>N^#8u-44*aCjl5*vB%y-H2*sKK#4xfaBFg1zxkyx2TU<%=R}TxW&-Gi zRJ`aUU0G0*7y>ZnG`w19w5wnnN_1(P=o=R16$4Lrar;<1!SsM&MO-9frzY;08@!)VAK5@Q~dAb1)of z*85mNo3WuFwS_ADk50XvF{1BA)r}OS?$LA?HMX()n1{xV57HlHkI;+|sz$|JaQ{|C zRiX*Sj8F6i!nuiqa6xKl z1d~b>!U<&$H2$oVdm@0!lm;w?R2q^v%kg&@1vDCx9LxR*(PU2Ovk=Rf387?6=(A|c z5h_s>MRbkw4Y$jSOEWbqdyCyYM3V!FK)c8codE7`jX4(pw_Cd5z}MqHj(#e4(N;3` zrwL|;s6jfI-{*1fW?3pBRIjQNp=qqw{q$Sts5AS$JO}(O5+}a9Cdh9ywSP9oBpXts ziG3Q64i^6>V+#m`0`ULtX8qUi_5W}CU*6XLqW`)}|Cg)!d;0&yYx>_2{&k}L?+AM! z|CcZAzx=;GJpbj1|Gt6$m+vC{hyPFW=zsZtTW9^3zh(G`|4$>W zfBAnaoBzuv@cqO8r_T9b{$H*5e|bOIfB63>$N%O3P3ZrZ$I|(S|4(}VU;f{vi2w5W e*8lMTS(uQQ0tNe@d!YXAIY0maQ=b2G_5T29GE>C> literal 0 HcmV?d00001 diff --git a/packages/kilo-console/src/components/LoadingLogo.tsx b/packages/kilo-console/src/components/LoadingLogo.tsx new file mode 100644 index 00000000000..6e261e69fab --- /dev/null +++ b/packages/kilo-console/src/components/LoadingLogo.tsx @@ -0,0 +1,34 @@ +import { DotLottie } from "@lottiefiles/dotlottie-web" +import { onCleanup, onMount } from "solid-js" + +const src = `${import.meta.env.BASE_URL}logo.lottie` + +export function LoadingLogo(props: { class?: string }) { + let canvas: HTMLCanvasElement | undefined + + onMount(() => { + if (!canvas) return + + const motion = !window.matchMedia("(prefers-reduced-motion: reduce)").matches + const player = new DotLottie({ + autoplay: motion, + canvas, + loop: motion, + src, + renderConfig: { + autoResize: true, + }, + }) + + onCleanup(() => player.destroy()) + }) + + return ( + (canvas = node)} + class={`console-loading-logo${props.class ? ` ${props.class}` : ""}`} + role="img" + aria-label="Kilo loading animation" + /> + ) +} diff --git a/packages/kilo-console/src/components/LoadingScreen.tsx b/packages/kilo-console/src/components/LoadingScreen.tsx new file mode 100644 index 00000000000..e1ffc181d0f --- /dev/null +++ b/packages/kilo-console/src/components/LoadingScreen.tsx @@ -0,0 +1,20 @@ +import { LoadingLogo } from "./LoadingLogo" + +type Variant = "fullscreen" | "content" + +export function LoadingScreen(props: { variant: Variant }) { + return ( +
+ +
+ ) +} diff --git a/packages/kilo-console/src/layouts/ConfigLayout.tsx b/packages/kilo-console/src/layouts/ConfigLayout.tsx index 09ce8141bd8..8f779b93283 100644 --- a/packages/kilo-console/src/layouts/ConfigLayout.tsx +++ b/packages/kilo-console/src/layouts/ConfigLayout.tsx @@ -1,6 +1,7 @@ import { Show } from "solid-js" import type { JSX } from "solid-js" import { Card } from "@kilocode/kilo-web-ui/card" +import { LoadingScreen } from "../components/LoadingScreen" import { ConfigProvider } from "../context/ConfigProvider" import { useConfig } from "../context/config" import { ConfigSidebar } from "../routes/config/ConfigSidebar" @@ -43,9 +44,7 @@ function ConfigContent(props: { children?: JSX.Element }) { - + {props.children} diff --git a/packages/kilo-console/src/routes/projects/ProjectConsoleRoute.tsx b/packages/kilo-console/src/routes/projects/ProjectConsoleRoute.tsx index 294b1ca2e07..7f576e7fb60 100644 --- a/packages/kilo-console/src/routes/projects/ProjectConsoleRoute.tsx +++ b/packages/kilo-console/src/routes/projects/ProjectConsoleRoute.tsx @@ -2,6 +2,7 @@ import { A, useLocation, useParams } from "@solidjs/router" import { createEffect, createMemo, createResource, createSignal, For, onCleanup, Show } from "solid-js" import { Card } from "@kilocode/kilo-web-ui/card" import { Icon } from "@kilocode/kilo-web-ui/icon" +import { LoadingScreen } from "../../components/LoadingScreen" import { createProjectPty, createProjectWorktree, @@ -677,14 +678,10 @@ export function ProjectConsoleRoute() {
- + - +