Skip to content

fix(ui): render the clarify card again - #303

Merged
jkyberneees merged 1 commit into
mainfrom
fix/webui-clarify-card-render
Oct 8, 2026
Merged

jkyberneees merged 1 commit into
mainfrom
fix/webui-clarify-card-render

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Problem

The WebUI clarify card never appeared. clarify.js set input.type = 'text' on a <textarea>; HTMLTextAreaElement.type is a readonly accessor, so the strict-mode module threw TypeError inside renderCard before the card was inserted into the DOM.

Fix

Remove the assignment. No other textarea .type writes exist in the UI (the remaining type='text' sites are <input> elements).

Tests

  • The DOM shim now models textarea.type as a getter-only property, matching browsers. With the old clarify.js, all clarify tests fail; with the fix they pass.
  • New tests cover the countdown and urgent state, expiry (custom and default timeout), undelivered answers staying retryable, the duplicate-submit guard (incl. ⌘+Enter and trimming), whitespace-only answers, interrupted/not-confirmed/accepted decision recording, foreign-id no-ops, card replacement, supervision exposure, and stop-work delegation.
  • clarify.js line coverage: 94.9% → 100% (branches 69% → 89%).
  • node --test "cmd/odek/ui/js/**/*.test.js": 263/263 pass.

🤖 Generated with Claude Code

clarify.js assigned input.type='text' on a <textarea>. HTMLTextAreaElement.type
is a readonly accessor, so the strict-mode module threw before the card was
inserted and the agent's question never appeared in the WebUI.

Drop the assignment. The DOM shim now models the readonly getter so the
regression fails every render test, and new tests cover the countdown and
expiry, undelivered answers, duplicate-submit guard, decision recording,
card replacement, supervision exposure and stop-work (clarify.js line
coverage 94.9% -> 100%).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
odek 691cd7d Commit Preview URL

Branch Preview URL
Oct 08 2026, 05:04 PM

@jkyberneees
jkyberneees merged commit 66a5140 into main Oct 8, 2026
10 checks passed
@jkyberneees
jkyberneees deleted the fix/webui-clarify-card-render branch October 8, 2026 17:18
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.

1 participant