Skip to content

fix(extension): side panel polish — floating memory card, empty-state hint, analytics toggle colour, history filter, pinned new-tab button - #4808

Merged
iscekic merged 7 commits into
mainfrom
fix/ext-sidepanel-polish
Jul 28, 2026
Merged

fix(extension): side panel polish — floating memory card, empty-state hint, analytics toggle colour, history filter, pinned new-tab button#4808
iscekic merged 7 commits into
mainfrom
fix/ext-sidepanel-polish

Conversation

@iscekic

@iscekic iscekic commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What this fixes

Five reported side-panel defects, each reproduced on the baseline (28802f7ff) before fixing (Chrome + Playwright, artifacts in the run record):

  1. Add to memory modal should float over instead of being on top. The card was a flex sibling above the transcript and consumed its layout height (measured: conversation region top 106 → 360.39, height 291 → 36.61 with a pending draft). It is now a centred role="dialog" overlay with a backdrop.
  2. "Pick a tab and ask Kilo to inspect it." should go away once there's a message in the chat. The greeting was a real seeded assistant event — persisted, and sent to the model as a prior turn. New conversations now start with zero events; the same string renders as the transcript's empty state and disappears after the first user message. Stored conversations whose first event is the legacy greeting are migrated on load (exact-text, first-position, assistant-only) and persisted back.
  3. Share usage analytics toggle lacked colour signalling on/off. On-state track was rgb(69,69,69) vs off rgb(51,51,51). The on state now uses the brand accent track with a dark knob.
  4. Empty conversations shouldn't be in history. History now lists only conversations with at least one user message; empty conversations are removed from storage when they stop being open (close deletes them, load-time normalization drops stored empty non-open rows), and closing a tab evicts the per-conversation draft/usage/cost atoms even when the replacement blank tab reuses the conversation id.
  5. New tab button should float on the right. The + button was the last child inside the horizontally scrolling tab strip (measured at x = 2087.53 in a 320px viewport). It is now a fixed-width sibling outside the strip, reachable at every scroll position.

Simpler-shape decisions (from the accepted plan)

  • S1 — the memory card reuses the existing overlay shape (fixed inset-0 … role="dialog" aria-modal="true") at z-[25]: above all panel chrome (context popover z-20, mode popover z-10), below Settings/History (z-30), so Manage memories still opens Settings visibly above the card.
  • S2 — the seeded greeting is deleted outright rather than filtered at render time, which also removes it from the first gateway request (asserted: one user, zero assistant messages).
  • S3 — History filters inside getSortedStoredConversationHistory via the existing isStoredConversationEmpty, the single funnel every History consumer routes through.
  • S4 — the existing hand-rolled switch is coloured in place; no component library, no shared Switch extraction.
  • S5 — item 5 is a flex restructure only: scroller flex-1 min-w-0 overflow-x-auto, button a shrink-0 sibling. No sticky positioning or scroll shadows.
  • S6 — item 5's new geometry assertions are Chrome-only; the Firefox spec already covers tab creation and there is no browser-API split.
  • S7 — no new dialog semantics on the card (no Escape/backdrop-dismiss/trap/restore), matching the extension's two existing overlays; the one addition is initial focus on the note textarea.

Recorded consequence: an unsent in-memory draft in a closed empty tab is discarded (drafts were previously recoverable only by reopening from History — a path empty conversations no longer have; sent content is never affected).

Verification

  • pnpm format, pnpm --filter kilo-extension verify (typecheck, lint, 420 unit tests), build, build:firefox — green.
  • e2e:chrome — 84 passed, 10 skipped, 0 failed. e2e:firefox — 33/33 workflows passed.
  • New coverage: transcript empty state (visible, no CTA, gone after first message), first-request role composition, legacy greeting migration (modern/legacyEvents/user-message-safe), history filter + count + empty state, empty-tab close eviction (incl. id-reuse regression), floating-card layout invariance + focus + settings-above-card stacking, analytics switch on/off computed RGB, new-tab button pinned at both scroll ends.

No new dependencies, no manifest permission changes, no DESIGN_TOKENS changes.

iscekic added 6 commits July 27, 2026 20:07
New conversations start with zero transcript events instead of a seeded
assistant greeting. The hint 'Pick a tab and ask Kilo to inspect it.'
now renders as a non-virtualized empty state inside the conversation
region, disappears once a user message exists, and is never sent to
the model as a prior assistant turn. Stored conversations whose first
event is the legacy greeting are migrated on load.
History now lists only conversations with at least one user message.
Empty conversations are removed from storage when they stop being open:
closing an empty tab deletes it, load-time normalization drops stored
empty non-open rows, and closing a tab evicts the per-conversation
draft, context-usage, and session-cost atoms even when the replacement
blank tab reuses the same conversation id.
The card is now a centred dialog overlay (role=dialog, aria-modal) at
z-[25] — above panel chrome, below the settings and history overlays —
instead of a flex sibling that consumed the conversation region's
layout height. Dismissal stays button-only, matching the existing
overlays; the note textarea receives focus when the draft form opens.
The switch track now uses the brand accent with a dark knob when on,
so the on and off states are visually distinct.
The + button was the last flex child inside the horizontally scrolling
tab strip and scrolled out of the panel viewport with many tabs open.
It is now a shrink-0 sibling outside the strip, which keeps its own
width reserved while the strip scrolls as before.
@iscekic iscekic self-assigned this Jul 27, 2026
@kilo-code-bot

kilo-code-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (16 files)
  • apps/extension/entrypoints/sidepanel/agent-chat-panel.tsx
  • apps/extension/entrypoints/sidepanel/agent-chat-panel.test.ts
  • apps/extension/entrypoints/sidepanel/auth-shell.tsx
  • apps/extension/entrypoints/sidepanel/conversation-list.tsx
  • apps/extension/entrypoints/sidepanel/conversation-tabs.tsx
  • apps/extension/entrypoints/sidepanel/pending-memory-save-card.tsx
  • apps/extension/src/shared/agent-conversation-tabs.ts
  • apps/extension/src/shared/agent-conversation-tabs.test.ts
  • apps/extension/tests/e2e/analytics.test.ts
  • apps/extension/tests/e2e/conversation-rendering.test.ts
  • apps/extension/tests/e2e/conversation-tabs.test.ts
  • apps/extension/tests/e2e/firefox-selenium-e2e.ts
  • apps/extension/tests/e2e/header-overlays.test.ts
  • apps/extension/tests/e2e/memories.test.ts
  • apps/extension/tests/e2e/run-abort.test.ts
  • apps/extension/tests/e2e/sidebar.test.ts

Reviewed by claude-sonnet-5 · Input: 34 · Output: 11.1K · Cached: 820.2K

Review guidance: REVIEW.md from base branch main

@iscekic

iscekic commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

(bot) @kilocode-bot please review the current head b79d6f7. It merges main into the branch; the apps/extension diff is byte-identical to 92f412d, which you already reviewed with no findings.

@kilo-code-bot

kilo-code-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Verification: apps/extension diff unchanged at b79d6f754

Verified the claim locally.

1. Head commit
b79d6f75444904066ff6a36f9a842cb77c7dae53 is the current head of fix/ext-sidepanel-polish (base: main).
It is a merge commit — Merge branch 'main' into fix/ext-sidepanel-polish — with parents 92f412d17 (branch) and 98118c752 (main head at merge time, which is also current origin/main).

2. Diffs compared (scoped to apps/extension)

Diff Bytes sha256
28802f7ff..92f412d17 (merge-base of main/92f412d17 → reviewed commit) 65490 313a8745…3dcfabd3
98118c752..b79d6f754 (merge-base of main/head → head) 65490 313a8745…3dcfabd3
28802f7ff..b79d6f754 (original branch point → head, fixed base) 65490 313a8745…3dcfabd3

3. Result: byte-identical. All three diffs have the same size and the same sha256, so the result holds under both the GitHub-style per-commit merge-base and a fixed common base.

Corroborating checks:

  • git rev-parse 92f412d17:apps/extension == git rev-parse b79d6f754:apps/extension21940155ea7f53acc4587700ac907fe88439a094 (identical trees).
  • git diff 28802f7ff 98118c752 -- apps/extension is empty → main contributed no apps/extension changes between the two bases.
  • git diff --name-only 92f412d17 b79d6f754 touches only apps/mobile, apps/web, packages/*, services/*, dev/local, .github/workflows, lockfile/config — no apps/extension paths, so the merge introduced no conflict resolutions or edits there.

4. Conclusion: no new review is needed for apps/extension at b79d6f754 — the extension changes are identical to those already reviewed at 92f412d17 with no findings. The merge only pulled in unrelated main changes outside apps/extension.

@kilo-code-bot

kilo-code-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Confirmed — the review at b79d6f754 is already posted in the thread and matches: apps/extension diff is byte-identical to 92f412d17, no new findings. No further action needed.

@iscekic
iscekic merged commit cdc05bc into main Jul 28, 2026
24 checks passed
@iscekic
iscekic deleted the fix/ext-sidepanel-polish branch July 28, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants