Repository navigation
Widget: fix release 0.8.16 review findings - #567
Merged
Merged
Conversation
…d `*.fdt` render An italic match starting before a code span swallowed it, so "Use *.set or `*.fdt` files" rendered as <em>.set or `</em>.fdt`. renderInlineMarkdown now lifts code spans out first and puts them back as <code> (or raw backticks inside an address), so code inside bold, italic and link text renders too. Tested: frontend/test-markdown.js (13 new cases).
A second @Keyframes osa-pulse replaced the header status dot's (opacity 1 to 0.4) with the status line's (0.25 to 1). The status line now uses osa-activity-pulse. frontend/test-widget-activity-status.js checks that the stylesheet defines each keyframes name once and that every animation started has keyframes. Tested: that suite passes.
Emptying the key with a non-Custom model hid the field under the cursor, dropping keyboard focus to the page. The field now stays while focused and is put away on blur; a press on a dialog button defers that until the click has landed, since the dialog is centred and hiding a field moves Save. Tested: frontend/test-widget-settings.js (6 new checks; 2 fail on the old code).
Settings checked a service-only model against an Anthropic key only for a menu pick: a custom openai.gpt-oss-120b saved and then 403'd on every send, and a custom openai/gpt-5 with an Anthropic key 400'd. One rule (modelKeyProblem, from _select_model, _bedrock_choice and _route_request) now covers the custom field and the menu, and is applied to saved settings: the platform-only rule at load, the offered-list rules once the community's own list arrives (a pinned widget may be older than its backend), each resetting the model with a notice. Default names no model, so it is not held to the rule: the server swaps a Bedrock default it cannot run on the caller's key for a Claude model. The widget now holds every alias in MODEL_ALIASES, so claude-haiku-4.5 and claude-sonnet-4.5 come back as the offered model, not Custom; a drift test keeps the two tables equal. Tested: frontend/test-widget-settings.js (new cases fail on the old code) and tests/test_frontend.
The default is left out of the menu's options (it is the Default entry), so a saved model equal to it, such as claude-sonnet-5 mapped to claude-sonnet-5-5 on NEMAR or a model picked before a community made it the default, left the menu blank, and saving from there stored an empty model. The match is made on the model an id stands for, for the default as well as the saved value. Tested: frontend/test-widget-settings.js (10 checks fail on the old code).
arrangeCapsule re-appends the circles when the window crosses 600px, and moving a node takes keyboard focus from it. Whichever circle had focus gets it back. Tested: frontend/test-widget-launcher-geometry.js (4 checks fail on the old code).
A redraw error raised by reveal.check() inside the done handler skipped applyDoneEvent, so the canonical text, citations and request id were lost and a completed answer was labeled 'Stream interrupted'. The handler now applies and saves the reply first and raises the page's failure after it, and the error path adds no interruption note once done has been received. Tested: frontend/test-widget-paced-streaming.js (5 checks fail on the old code).
The comment on the pagehide handler said the rest of a reply is 'saved' when the page is left, but nothing there saves: showing the rest releases the wait that holds a reply whose done has arrived, so its done handler saves it at once, and a reply still streaming is saved only by its own done. Comment corrected, no behaviour change; a test pins that a still-streaming reply is not saved by pagehide. Tested: frontend/test-widget-paced-streaming.js.
A release PR run failed with 'Chrome did not report a DevTools endpoint' after 30 seconds. launch() now kills that Chrome and starts another, in its own profile, waiting 90 seconds for its endpoint; only a second silence fails the run. Every Chrome check goes through launch(), so all are covered. Tested: tests/test_frontend/test_chrome_launch.py runs the real launch() against a stand-in executable that is silent on its first start; the real Chrome checks still pass.
…ed clock The paced-reveal, activity-status and launcher-geometry checks held a shared runner to numbers measured on a quiet laptop. Each timed bound is now stretched by how late the page's own sampler ran in the window it times (capped), so the same bound holds when nothing stalled; the wait's digits are held to the clock and to each other instead of to fixed seconds; frame counts follow the run's frame rate, keeping one in-between frame as the floor against a snap. Tested in real Chrome: all three pass; a stream 2.3 s slower fails the old fixed-digit check and passes the new one; a widget that restarts the wait at each label still fails it.
Contributor
Preview Deployment
This preview will be updated automatically when you push new commits. |
chrome.js imported serve.js at the top, and serve.js needs the pyodide package, which only the Frontend job installs. The new launch tests in tests/test_frontend import chrome.js, so they failed in the Python test job (Cannot find module 'pyodide/package.json') while passing locally where node_modules existed. serve.js is now imported inside main(), the only place startServer is used. Tested: tests/test_frontend passes (112) with no node_modules present; the 5 launch tests failed the same way before the change.
This was referenced Sep 30, 2026
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.
Fixes the widget and Chrome-harness findings from the five-reviewer review of release PR #562. Each was reproduced or confirmed before it was changed. One commit per finding; the model and key rules mirror
_select_model,_bedrock_choiceand_route_requestinsrc/api/routers/community.pyas they are on currentdevelop.Changes
renderInlineMarkdownlifts code spans out first, so the sentenceUse *.set or `*.fdt` filesis text plus one code span (it rendered<em>.set or `</em>.fdt` files). Code inside bold, italic and link text renders too. 13 new cases infrontend/test-markdown.js(globs, bullet, heading, table cell, bold beside code, a forged placeholder).@keyframes osa-pulse. The status line's pulse is nowosa-activity-pulse; the header status dot keeps its own.test-widget-activity-status.jschecks each keyframes name is defined once and every animation started has keyframes.test-widget-settings.js.modelKeyProblem) now covers the Custom field and the menu, and is applied to saved settings: the platform-only rule at load, the offered-list rules once the community's own list arrives (a pinned widget can be older than its backend, so a model missing from its fallback list proves nothing at load). The widget holds every alias inMODEL_ALIASES(was one), soclaude-haiku-4.5andclaude-sonnet-4.5come back as the offered model and save with an Anthropic key. A drift test keeps the two tables equal.model: "".arrangeCapsulereorders them.pagehidesaves; showing the rest releases the wait that holds a reply whosedonehas arrived, sodonesaves it at once. A test pins that a still-streaming reply is not saved bypagehide.donehandler applies and saves the canonical text, citations and request id first and raises the page's failure after them, and the error path adds no "Stream interrupted" note oncedonehas arrived.launch()kills a Chrome that reports no DevTools endpoint and starts another in a fresh profile, waiting 90 s; every Chrome check goes through it. Timed bounds inpaced-reveal-check,activity-status-checkandlauncher-geometry-checkare stretched by how late the page's own sampler ran in the window they time (capped), the wait's digits are held to the clock and to each other instead of fixed seconds, and frame counts follow the run's frame rate with one in-between frame as the floor against a snap.Not changed
STREAM_TIMEOUT_MS. Confirmed dead: the elapsed time is measured a moment afterlastChunkTimeis reset, and the wait is insidereader.read(). Against the real widget a 61 s gap between chunks completes normally and a stream that never resumes is still pending. Not fixed here: the server sends no keepalive on the chat stream, so enforcing 60 s would cut a reply with a legitimately quiet stretch (reasoning before the first word, a slow tool) that today finishes inside the 120 s request bound. Filed as Widget: STREAM_TIMEOUT_MS never fires, so a stalled stream is bounded only by the 120 s request timeout #564 with both options.pagehidewould store unlabelled partial text as if complete; the comment was wrong, so the comment changed._route_requestswaps a Bedrock default it cannot run for Claude, and refuses only a model the request names. A test pins both halves.claude-haiku.4.5. The finding's spelling is not a server alias (the alias isclaude-haiku-4.5); the server answers it 400 and so does the widget.Also found
paced-reveal-checkused strict<, which two quartiles landing on one sampled frame defeat; now in order, with the first and third apart.loadUserSettingslet a non-string saved model through unchecked; it is now treated as invalid.Testing
Bun 1.4.2 (the version CI pins; local 1.3.10 fails
test-widget-popout.jsand the bundle check ondevelopitself), Chrome 154 on macOS.bun frontend/test-*.js,test-widget-*.js,workers/osa-worker/test-*.js,notebook/test-open.js,notebook/test-bridge.js,scripts/build-runtime-bundle.js --check,node --checkon the widget and worker: all passpaced-reveal-check,activity-status-check,launcher-geometry-check,color-scheme-check --serve,first-paint-check --serve,popout-check --serve,chrome.js: all passuv run pytest tests/test_frontend -q -p no:cacheprovider --color=no: 112 passed (includes the launch-retry test and the alias drift test)uv run ruff check .andruff format --check src tests: cleantests/test_frontendRefs #564