Repository navigation
feat(buddy): visual welcome and Settings, formatted answers, Enter to send; Help as a ? icon - #4
Merged
Merged
Conversation
Qwen3.5 2B sent the same lookup_skill_index call again and again; the guard answered each repeat with "Repeated tool call stopped" and the chat ended as "could not complete". Now, at the second identical call of a meta tool in one turn, Buddy answers from the earlier result with a repeated error that names the next call: read_skill for a lookup, the first hit's call for find_tool, the call_tool line for describe_tool, read_skill and find_in_skill. Other tools keep the stop at the third identical call. Set A eval, one run each: lfm3-1.7b 13/20 to 15/20; qwen3.5-2b 0/20 to 1/20 (it follows the hint but keeps rewording its search).
The welcome paragraph is replaced by a strip of the apps Buddy can work in (first 8, then a +N chip) and three one-line starters. Their icons are clones of the desktop's own icons, tile included, with a letter badge when Buddy runs without the desktop. Sentences that sat in view move into pop-ups on the controls they describe (help.js): the download note, the composer keys, the storage note and the small-model warning, each with a visible badge or dot. A pop-up opens on hover after 300 ms, on keyboard focus, and on a tap of a help dot; it closes on Esc, an outside press, blur, scrolling, and when its own control is pressed, so it never covers a menu that control opens. The model picker's help says which models suit app work. Load model now starts disabled until Buddy has started: a click in the moment before the script ran was lost and Buddy stayed "Not loaded".
Both failed on main and on v0.1.0: - pc-ai-agent.spec.mjs seeded the old voice-agent record after Buddy had already started once; Buddy copies legacy records on its first start only, by design. The spec now seeds it from another page on the same origin before Buddy's first start. - pc-buddy-agent.spec.mjs still expected the per-turn skill note that the measured defaults turned off; it now expects no note.
…agged
An LFM3 answer listing the apps stopped mid-line at 384 tokens and
showed raw **bold**.
- markdown.js: Markdown becomes DOM nodes through a syntax tree
(mdast-util-from-markdown with GFM), never through HTML strings. An
allow-list of elements; links only for http, https and mailto; no
images (their URL would leave the device); raw HTML stays text; any
parse or walk failure falls back to plain text. Bundled with the
pinned esbuild by prepare-ai-agent.mjs; the three parser packages
are pinned in package.json at the versions already installed.
- worker.js: MAX_NEW_TOKENS 384 to 1024, and done carries truncated
when an answer hit the limit; cloud-client.js sets it on max_tokens
or a length finish. model-client.js passes it on as
{ text, truncated: true } only for a cut-off answer, so every other
result stays a string. session.js emits reply-cut for a cut-off
final answer.
Checked on a real model (LFM3, WebGPU): the same prompt now finishes in
19 s with 25 rendered list items and no literal asterisks.
…rmatted answers
- Settings is eight cards (an icon, a title, the controls and short
chips) with each section's sentences in a help dot; the warnings keep
visible badges ("Key in memory only", "Sends to <host>", "Sends URLs
to Jina", "This session only"). The provider choice is a segmented
control. Help pop-ups mount inside the modal dialog, which sits in the
browser's top layer; the first Esc closes a pop-up and the second the
dialog. Opening Settings by keyboard shows no pop-up.
- Import sits next to Export in the header (it was "Open backup..." at
the bottom of Settings). Below a 440 px panel, New chat, Export and
Import become icon buttons so the header fits a 390 px screen.
- Enter sends; Shift + Enter adds a line; Ctrl or Cmd + Enter still
sends; nothing is sent while an input method is composing.
- Assistant answers render Markdown (renderMarkdown, at most once per
animation frame while streaming); a cut-off answer gets a "Cut short"
chip. User bubbles and tool cards stay plain text.
The browser specs that asserted raw "**42**" and "**kept**" now assert
the rendered elements.
The top bar's Help button and the "About WebPC" app opened the same window. The window is now the desktop's built-in Help (internal id `about` kept, so saved window state still works), opened only by a "?" icon button styled like the theme toggle. The catalog entry is removed, so the app no longer shows on the desktop, in the Apps list or in app search, and the catalog no longer accepts kind "about". A saved desktop layout that still lists `about` loads cleanly; a unit test pins it. The launcher spec now filters by Developer, since the System category left with the About app.
…s how
The project convention: an app added to the catalog must compile to a
wasm module to be packaged with WebPC. Each kind: iframe app now
carries
wasm:
build: <the command that builds its wasm from its source repo>
The validator requires wasm.build for every packaged app. The eight
existing JavaScript apps (docs, sqliteviz, files, media, cyberchef,
nettools, beepbox, excalidraw) are grandfathered in LEGACY_NON_WASM, a
closed list: a new app cannot be added to it to pass the check.
External links and the Buddy panel are not packaged as apps and need
no wasm. WebPC's own build does not run the command; it ships the
pinned upstream artifact.
The 15 build commands come from each app's source repo at the pinned
tag (the Craft apps' packaging/web/package.sh, v86's Makefile,
wiregasm's Makefile); none is invented.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Buddy gets a visual welcome and Settings, help text in hover pop-ups, formatted answers, and a fix for small models stuck repeating a search. The desktop's Help becomes a "?" icon, and the duplicate About WebPC app is gone. The catalog now requires every packaged app to build to wasm.
What changes
Buddy: less text, more visual
help.js) open on hover after 300 ms, on keyboard focus, and on a tap of a help dot; they close on Esc, an outside press, blur and scrolling, and when their own control is pressed, so they never cover a menu. Inside the modal Settings dialog they mount in the dialog, which sits in the browser's top layer.Buddy: answers
read_skill path=...) instead of "Repeated tool call stopped", which left Qwen3.5 2B looping.Desktop
Fixes found while testing (each was already failing on main and on v0.1.0):
pc-ai-agent.spec.mjs:136failed about 1 run in 3).pc-buddy-agent.spec.mjs:43still expected the per-turn skill note that the measured defaults turned off in feat(buddy): agent-native WebPC: tools and skills for every app, saved chats, eval harness #2.Catalog: packaged apps build to wasm
wasm.buildfield incatalog.yamlrecords the command that builds an app's wasm from its source repository at the pinned version. Every packaged app (kind: iframe) must have one; the validator names the app and says what to add. WebPC's own build does not run it; it ships the pinned upstream artifact.packaging/web/package.sh, v86'sMakefile, wiregasm'sMakefile). The 8 existing JavaScript apps are grandfathered inLEGACY_NON_WASM, a closed list; external links and the Buddy panel are exempt.Dependencies:
mdast-util-from-markdown2.0.3,mdast-util-gfm3.1.0 andmicromark-extension-gfm3.0.0 are pinned in package.json at the versions already installed (they were Astro's dependencies); markdown.js is bundled with the pinned esbuild.Eval (set A, 20 tasks, one chat per task, one run each)
Qwen follows the next-step hint but keeps rewording its search, so the model picker's help steers app work to LFM3.
How it was checked
Source: this branch, 7 commits on main 05c6b97.
node --test tests/*.test.mjs: PASS, 1148/1148.npm run build, thennpx playwright test --config scripts/qa/playwright.config.mjs): PASS, 80/80 on the final tree (c1d3ced).pc-linux.spec.mjs:10(real Linux, an edit then a reload) is a flake that predates this PR: it failed 2 of 8 runs on this branch and 2 of 6 on v0.1.0, and no file here is loaded by the Terminal.pc-ai-agent.spec.mjs:136repeated 10 times: PASS, 10/10.node scripts/agent/eval.mjs --model <m> --set Aagainst a local preview, results above.Not run: Safari, Firefox, a physical phone, and the eval's sets B and C.