• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive-studio / 25499315956
68%
main: 71%

Build:
Build:
LAST BUILD BRANCH: renovate/anthropics-claude-code-action-digest
DEFAULT BRANCH: main
Ran 07 May 2026 01:41PM UTC
Jobs 1
Files 505
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 May 2026 01:37PM UTC coverage: 67.838% (+0.1%) from 67.719%
25499315956

Pull #2207

github

samuv
fix(playground): defer empty thread persistence until first message

Visiting /playground or clicking + New chat used to call createChatThread() over IPC, which immediately wrote an empty thread row to SQLite even when the user never ended up sending a message. Every fresh session leaked one (or more) empty threads into the DB, and the row was indistinguishable from a real conversation in the sidebar / on reload.

Generate the thread id in the renderer and only promote the draft to a real DB row when the user submits the first message. A new thread-id util produces ids with the same thread_<ts>_<rand> shape the main process uses, so drafts are visually identical to persisted ids in the URL and sidebar. playground.index.tsx's beforeLoad resolver now redirects to a locally-generated id instead of calling createChatThread() when no DB threads exist.

usePlaygroundThreads tracks drafts in renderer state with a pending: true flag so the sidebar still renders them as normal items. createThread() reuses an existing empty draft instead of piling up new ones on repeated + New chat clicks, and deleteThread short-circuits the IPC for drafts (which would otherwise return 'Thread not found' and block the navigation away).

useChatStreaming.validatedSendMessage awaits ensureThreadExists(currentThreadId) before calling sendMessage, so the row exists by the time runManagedStream starts writing snapshots via updateThreadMessages. Promotion failure short-circuits the send with a thrown error.

Drafts intentionally do not survive an app reload — acceptable for a chat the user never committed to. setActiveThreadId(draftId) is left as-is: main stores the id but the index resolver validates it against getAllThreads() on the next visit and falls back. Tests updated for the index route, usePlaygroundThreads (draft generation, draft reuse, pending-draft delete), and useChatStreaming (ensureThreadExists ordering + failure short-circuit).
Pull Request #2207: fix(playground): defer empty chat thread persistence until first message

4690 of 7457 branches covered (62.89%)

25 of 26 new or added lines in 6 files covered. (96.15%)

1 existing line in 1 file now uncovered.

7005 of 10326 relevant lines covered (67.84%)

120.88 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
1.2
0.0% main/src/chat/threads-storage.ts

Coverage Regressions

Lines Coverage ∆ File
1
81.25
-8.22% renderer/src/routes/playground.index.tsx
Jobs
ID Job ID Ran Files Coverage
1 25499315956.1 07 May 2026 01:41PM UTC 505
67.84
GitHub Action Run
Source Files on build 25499315956
  • Tree
  • List 505
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25499315956
  • Pull Request #2207
  • PR Base - main (#25496320513)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc