Merge pull request #275 from Kilo-Org/igor/pr255-review-fixes

This commit is contained in:
Igor Šćekić
2026-02-12 12:14:02 +01:00
committed by GitHub
19 changed files with 110 additions and 83 deletions
@@ -737,7 +737,7 @@ Each phase has specific acceptance criteria (listed above). The general verifica
| Session history | List renders, selection works, navigation back to chat |
| Login flow | Device auth card renders, QR code displays, success/error states |
| Theme switching | Change VS Code theme → webview updates automatically |
| Sidebar ↔ tab | Both webview hosts render identically |
| Sidebar ↔ tab | Both webview hosts render identically |
| Markdown content | Headers, lists, code blocks, links render correctly |
| Long conversations | Auto-scroll works, performance is acceptable |
@@ -16,7 +16,9 @@ import { useLanguage } from "../../context/language"
import { formatRelativeDate } from "../../utils/date"
import type { SessionInfo } from "../../types/messages"
function dateGroup(iso: string): string {
const DATE_GROUP_KEYS = ["time.today", "time.yesterday", "time.thisWeek", "time.thisMonth", "time.older"] as const
function dateGroupKey(iso: string): (typeof DATE_GROUP_KEYS)[number] {
const now = new Date()
const then = new Date(iso)
@@ -25,19 +27,11 @@ function dateGroup(iso: string): string {
const weekAgo = new Date(today.getTime() - 7 * 86400000)
const monthAgo = new Date(today.getTime() - 30 * 86400000)
if (then >= today) return "Today"
if (then >= yesterday) return "Yesterday"
if (then >= weekAgo) return "This Week"
if (then >= monthAgo) return "This Month"
return "Older"
}
const GROUP_ORDER: Record<string, number> = {
Today: 0,
Yesterday: 1,
"This Week": 2,
"This Month": 3,
Older: 4,
if (then >= today) return DATE_GROUP_KEYS[0]
if (then >= yesterday) return DATE_GROUP_KEYS[1]
if (then >= weekAgo) return DATE_GROUP_KEYS[2]
if (then >= monthAgo) return DATE_GROUP_KEYS[3]
return DATE_GROUP_KEYS[4]
}
interface SessionListProps {
@@ -90,9 +84,9 @@ const SessionList: Component<SessionListProps> = (props) => {
function confirmDelete(s: SessionInfo) {
dialog.show(() => (
<Dialog title={language.t("session.delete.title")} fit>
<div style={{ display: "flex", "flex-direction": "column", gap: "16px", padding: "0 16px 12px" }}>
<div class="dialog-confirm-body">
<span>{language.t("session.delete.confirm", { name: s.title || language.t("session.untitled") })}</span>
<div style={{ display: "flex", "justify-content": "flex-end", gap: "8px" }}>
<div class="dialog-confirm-actions">
<Button variant="ghost" size="large" onClick={() => dialog.close()}>
{language.t("common.cancel")}
</Button>
@@ -147,8 +141,11 @@ const SessionList: Component<SessionListProps> = (props) => {
}}
search={{ placeholder: language.t("session.search.placeholder"), autofocus: false }}
emptyMessage={language.t("session.empty")}
groupBy={(s) => dateGroup(s.updatedAt)}
sortGroupsBy={(a, b) => (GROUP_ORDER[a.category] ?? 99) - (GROUP_ORDER[b.category] ?? 99)}
groupBy={(s) => language.t(dateGroupKey(s.updatedAt))}
sortGroupsBy={(a, b) => {
const rank = Object.fromEntries(DATE_GROUP_KEYS.map((k, i) => [language.t(k), i]))
return (rank[a.category] ?? 99) - (rank[b.category] ?? 99)
}}
itemWrapper={wrapItem}
>
{(s) => (
@@ -773,10 +773,11 @@ export const dict = {
"time.hoursAgo": "قبل {{count}} ساعة",
"time.daysAgo": "قبل {{count}} يوم",
"time.monthsAgo": "قبل {{count}} شهر",
"session.search.placeholder": "البحث في الجلسات...",
"session.empty": "لا توجد جلسات بعد. انقر على + لبدء محادثة جديدة.",
"session.untitled": "بدون عنوان",
"time.today": "اليوم",
"time.yesterday": "أمس",
"time.thisWeek": "هذا الأسبوع",
"time.thisMonth": "هذا الشهر",
"time.older": "أقدم",
"settings.aboutKiloCode.status.connected": "متصل",
"settings.aboutKiloCode.status.connecting": "جارٍ الاتصال...",
@@ -780,10 +780,11 @@ export const dict = {
"time.hoursAgo": "{{count}}h atrás",
"time.daysAgo": "{{count}}d atrás",
"time.monthsAgo": "{{count}} meses atrás",
"session.search.placeholder": "Pesquisar sessões...",
"session.empty": "Nenhuma sessão ainda. Clique em + para iniciar uma nova conversa.",
"session.untitled": "Sem título",
"time.today": "Hoje",
"time.yesterday": "Ontem",
"time.thisWeek": "Esta semana",
"time.thisMonth": "Este mês",
"time.older": "Mais antigo",
"settings.aboutKiloCode.status.connected": "Conectado",
"settings.aboutKiloCode.status.connecting": "Conectando...",
@@ -807,10 +807,11 @@ export const dict = {
"time.hoursAgo": "prije {{count}}h",
"time.daysAgo": "prije {{count}}d",
"time.monthsAgo": "prije {{count}} mj.",
"session.search.placeholder": "Pretraži sesije...",
"session.empty": "Još nema sesija. Kliknite + za pokretanje novog razgovora.",
"session.untitled": "Bez naslova",
"time.today": "Danas",
"time.yesterday": "Jučer",
"time.thisWeek": "Ove sedmice",
"time.thisMonth": "Ovog mjeseca",
"time.older": "Starije",
"settings.aboutKiloCode.status.connected": "Povezano",
"settings.aboutKiloCode.status.connecting": "Povezivanje...",
@@ -779,10 +779,11 @@ export const dict = {
"time.hoursAgo": "{{count}}t siden",
"time.daysAgo": "{{count}}d siden",
"time.monthsAgo": "{{count}} mdr. siden",
"session.search.placeholder": "Søg i sessioner...",
"session.empty": "Ingen sessioner endnu. Klik + for at starte en ny samtale.",
"session.untitled": "Uden titel",
"time.today": "I dag",
"time.yesterday": "I går",
"time.thisWeek": "Denne uge",
"time.thisMonth": "Denne måned",
"time.older": "Ældre",
"settings.aboutKiloCode.status.connected": "Forbundet",
"settings.aboutKiloCode.status.connecting": "Forbinder...",
@@ -785,10 +785,11 @@ export const dict = {
"time.hoursAgo": "vor {{count}} Std.",
"time.daysAgo": "vor {{count}} T.",
"time.monthsAgo": "vor {{count}} Mon.",
"session.search.placeholder": "Sitzungen durchsuchen...",
"session.empty": "Noch keine Sitzungen. Klicken Sie auf +, um eine neue Unterhaltung zu starten.",
"session.untitled": "Ohne Titel",
"time.today": "Heute",
"time.yesterday": "Gestern",
"time.thisWeek": "Diese Woche",
"time.thisMonth": "Diesen Monat",
"time.older": "Älter",
"settings.aboutKiloCode.status.connected": "Verbunden",
"settings.aboutKiloCode.status.connecting": "Verbindung wird hergestellt...",
@@ -812,10 +812,11 @@ export const dict = {
"time.hoursAgo": "{{count}}h ago",
"time.daysAgo": "{{count}}d ago",
"time.monthsAgo": "{{count}}mo ago",
"session.search.placeholder": "Search sessions...",
"session.empty": "No sessions yet. Click + to start a new conversation.",
"session.untitled": "Untitled",
"time.today": "Today",
"time.yesterday": "Yesterday",
"time.thisWeek": "This Week",
"time.thisMonth": "This Month",
"time.older": "Older",
"settings.aboutKiloCode.status.connected": "Connected",
"settings.aboutKiloCode.status.connecting": "Connecting...",
@@ -785,10 +785,11 @@ export const dict = {
"time.hoursAgo": "hace {{count}}h",
"time.daysAgo": "hace {{count}}d",
"time.monthsAgo": "hace {{count}} meses",
"session.search.placeholder": "Buscar sesiones...",
"session.empty": "Aún no hay sesiones. Haz clic en + para iniciar una nueva conversación.",
"session.untitled": "Sin título",
"time.today": "Hoy",
"time.yesterday": "Ayer",
"time.thisWeek": "Esta semana",
"time.thisMonth": "Este mes",
"time.older": "Anterior",
"settings.aboutKiloCode.status.connected": "Conectado",
"settings.aboutKiloCode.status.connecting": "Conectando...",
@@ -789,10 +789,11 @@ export const dict = {
"time.hoursAgo": "il y a {{count}}h",
"time.daysAgo": "il y a {{count}}j",
"time.monthsAgo": "il y a {{count}} mois",
"session.search.placeholder": "Rechercher des sessions...",
"session.empty": "Aucune session pour l'instant. Cliquez sur + pour démarrer une nouvelle conversation.",
"session.untitled": "Sans titre",
"time.today": "Aujourd'hui",
"time.yesterday": "Hier",
"time.thisWeek": "Cette semaine",
"time.thisMonth": "Ce mois-ci",
"time.older": "Plus ancien",
"settings.aboutKiloCode.status.connected": "Connecté",
"settings.aboutKiloCode.status.connecting": "Connexion en cours...",
@@ -773,10 +773,11 @@ export const dict = {
"time.hoursAgo": "{{count}}時間前",
"time.daysAgo": "{{count}}日前",
"time.monthsAgo": "{{count}}ヶ月前",
"session.search.placeholder": "セッションを検索...",
"session.empty": "セッションはまだありません。+をクリックして新しい会話を始めましょう。",
"session.untitled": "無題",
"time.today": "今日",
"time.yesterday": "昨日",
"time.thisWeek": "今週",
"time.thisMonth": "今月",
"time.older": "それ以前",
"settings.aboutKiloCode.status.connected": "接続済み",
"settings.aboutKiloCode.status.connecting": "接続中...",
@@ -778,10 +778,11 @@ export const dict = {
"time.hoursAgo": "{{count}}시간 전",
"time.daysAgo": "{{count}}일 전",
"time.monthsAgo": "{{count}}개월 전",
"session.search.placeholder": "세션 검색...",
"session.empty": "아직 세션이 없습니다. +를 클릭하여 새 대화를 시작하세요.",
"session.untitled": "제목 없음",
"time.today": "오늘",
"time.yesterday": "어제",
"time.thisWeek": "이번 주",
"time.thisMonth": "이번 달",
"time.older": "이전",
"settings.aboutKiloCode.status.connected": "연결됨",
"settings.aboutKiloCode.status.connecting": "연결 중...",
@@ -782,10 +782,11 @@ export const dict = {
"time.hoursAgo": "{{count}}t siden",
"time.daysAgo": "{{count}}d siden",
"time.monthsAgo": "{{count}} mnd. siden",
"session.search.placeholder": "Søk i sesjoner...",
"session.empty": "Ingen sesjoner ennå. Klikk + for å starte en ny samtale.",
"session.untitled": "Uten tittel",
"time.today": "I dag",
"time.yesterday": "I går",
"time.thisWeek": "Denne uken",
"time.thisMonth": "Denne måneden",
"time.older": "Eldre",
"settings.aboutKiloCode.status.connected": "Tilkoblet",
"settings.aboutKiloCode.status.connecting": "Kobler til...",
@@ -781,10 +781,11 @@ export const dict = {
"time.hoursAgo": "{{count}} godz. temu",
"time.daysAgo": "{{count}} dn. temu",
"time.monthsAgo": "{{count}} mies. temu",
"session.search.placeholder": "Szukaj sesji...",
"session.empty": "Brak sesji. Kliknij +, aby rozpocząć nową rozmowę.",
"session.untitled": "Bez tytułu",
"time.today": "Dzisiaj",
"time.yesterday": "Wczoraj",
"time.thisWeek": "Ten tydzień",
"time.thisMonth": "Ten miesiąc",
"time.older": "Starsze",
"settings.aboutKiloCode.status.connected": "Połączono",
"settings.aboutKiloCode.status.connecting": "Łączenie...",
@@ -785,10 +785,11 @@ export const dict = {
"time.hoursAgo": "{{count}} ч. назад",
"time.daysAgo": "{{count}} дн. назад",
"time.monthsAgo": "{{count}} мес. назад",
"session.search.placeholder": "Поиск сессий...",
"session.empty": "Пока нет сессий. Нажмите +, чтобы начать новую беседу.",
"session.untitled": "Без названия",
"time.today": "Сегодня",
"time.yesterday": "Вчера",
"time.thisWeek": "На этой неделе",
"time.thisMonth": "В этом месяце",
"time.older": "Ранее",
"settings.aboutKiloCode.status.connected": "Подключено",
"settings.aboutKiloCode.status.connecting": "Подключение...",
@@ -771,10 +771,11 @@ export const dict = {
"time.hoursAgo": "{{count}} ชม. ที่แล้ว",
"time.daysAgo": "{{count}} วันที่แล้ว",
"time.monthsAgo": "{{count}} เดือนที่แล้ว",
"session.search.placeholder": "ค้นหาเซสชัน...",
"session.empty": "ยังไม่มีเซสชัน คลิก + เพื่อเริ่มการสนทนาใหม่",
"session.untitled": "ไม่มีชื่อ",
"time.today": "วันนี้",
"time.yesterday": "เมื่อวาน",
"time.thisWeek": "สัปดาห์นี้",
"time.thisMonth": "เดือนนี้",
"time.older": "เก่ากว่า",
"settings.aboutKiloCode.status.connected": "เชื่อมต่อแล้ว",
"settings.aboutKiloCode.status.connecting": "กำลังเชื่อมต่อ...",
@@ -774,10 +774,11 @@ export const dict = {
"time.hoursAgo": "{{count}} 小时前",
"time.daysAgo": "{{count}} 天前",
"time.monthsAgo": "{{count}} 个月前",
"session.search.placeholder": "搜索会话...",
"session.empty": "暂无会话。点击 + 开始新对话。",
"session.untitled": "无标题",
"time.today": "今天",
"time.yesterday": "昨天",
"time.thisWeek": "本周",
"time.thisMonth": "本月",
"time.older": "更早",
"settings.aboutKiloCode.status.connected": "已连接",
"settings.aboutKiloCode.status.connecting": "连接中...",
@@ -771,10 +771,11 @@ export const dict = {
"time.hoursAgo": "{{count}} 小時前",
"time.daysAgo": "{{count}} 天前",
"time.monthsAgo": "{{count}} 個月前",
"session.search.placeholder": "搜尋工作階段...",
"session.empty": "尚無工作階段。按 + 開始新的對話。",
"session.untitled": "未命名",
"time.today": "今天",
"time.yesterday": "昨天",
"time.thisWeek": "本週",
"time.thisMonth": "本月",
"time.older": "更早",
"settings.aboutKiloCode.status.connected": "已連線",
"settings.aboutKiloCode.status.connecting": "連線中...",
@@ -346,6 +346,20 @@
white-space: nowrap;
}
/* Dialog Confirmation */
.dialog-confirm-body {
display: flex;
flex-direction: column;
gap: 16px;
padding: 0 24px 12px 24px;
}
.dialog-confirm-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
}
/* Session List Items */
.session-list [data-slot="list-item-title"] {
flex: 1;