Skip to content

fix(visuals): drop the passwords notice above custom html - #758

Merged
nixuuu merged 1 commit into
devfrom
fix/remove-html-secrets-notice
Nov 14, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/remove-html-secrets-notice

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 14, 2026

Copy link
Copy Markdown
Member

Removes the "Custom HTML from the agent. Don't enter passwords or secrets." notice shown above render_html visuals, at the user's request: it took a full row on every visual, most visibly on mobile.

  • Web (VisualFrame.svelte): notice row removed.
  • Mobile (VisualWebView.tsx): notice row removed; the gate before running custom HTML keeps a short label, "Custom HTML from the agent.", with its Run button.
  • Desktop viewer window: the shell no longer renders the notice (showWarning option and its CSS removed from @canopy/domain visual shell).
  • docs/agent-visuals.md: the trust-boundary section no longer describes the notice; the sandbox (opaque origin, no forms/links/top navigation, desktop network block) stays the protection, as before. The model instruction "Do not ask for passwords or secrets." in the tool description stays.

No security boundary changes: the iframe sandbox, CSP and lockdown are untouched.

Copy audit (docs/copy.md §8)

Before After Reason
"Custom HTML from the agent. Don't enter passwords or secrets." (row above every custom HTML visual: web, mobile, desktop viewer) — (removed) User request; the row repeated on every visual and the sandbox, not the text, is the protection.
Mobile Run gate: "Custom HTML from the agent. Don't enter passwords or secrets." "Custom HTML from the agent." One idea per sentence; keeps the gate's context without the removed warning.

Checks: typecheck, lint, format:check, tests/integration/visuals.test.ts.

@nixuuu
nixuuu merged commit 8767cd5 into dev Nov 14, 2026
11 checks passed
@nixuuu
nixuuu deleted the fix/remove-html-secrets-notice branch November 14, 2026 21:21
nixuuu added a commit that referenced this pull request Nov 14, 2026
Android thread cards can lose their Run choice when virtualized, discard
loaded thumbnail URIs when leaving the viewport, and move the feed as
the composer folds. Thread details also share entrance progress with
drag position and have no intermediate resting position.

This change keeps HTML consent and measured heights per visual/version
for the pairing session, uses a compact 112 dp gate, preserves thumbnail
Image instances and synchronously restores cached file URIs on remount,
retains the composer scroll reserve, and separates sheet entrance from
drag offset. Thread details snap fully open or 40% down; dragging beyond
65% closes them. The scroll viewport remains usable at both positions.
Visual resize updates use the existing feed anchor, and Android clipping
no longer detaches native WebViews inside retained inverted cells.
Distant turns remain virtualized. Web behavior is unchanged.

Fixes: #719

The linked regression is specifically the per-mount HTML Run state
introduced in #719; the other behavior is pre-existing. Related: #758,
#419, #425. Rebased onto #758 and retained its notice removal and
`Custom HTML from the agent.` gate label.

### Original recording

Reviewed at 12 fps; timestamps are seconds from the start, with
approximately 0.08 s precision.

| Problem | Evidence | Change |
| --- | --- | --- |
| Tall blank HTML card; Run does not reveal content | 00.00–12.50 and
21.00–24.67; taps around 09.50/10.17 | Compact gate; session consent
across row/slot/fullscreen remounts; explicit non-flex WebView sizing;
token-validated height updates and anchored resize. Failure/watchdog
revokes consent, so failed code does not automatically run again. |
| Composer flips between compact/full | 01.00–01.50, 06.17–06.50,
10.75–11.17, 22.75–23.17 | Folding no longer releases the native list
reserve; only active finger travel can change fold state, and expansion
requires deliberate travel toward the end. Momentum interrupted by a tap
cannot inherit drag intent. |
| Details sheet jumps/rebounds; content also shifts | Opening
12.83–13.33; dragging 13.75–20.75; inner content 18.25–18.83 | Explicit
surface height and seeded modal safe areas; separate entrance/drag
values; two resting positions; bottom-only scroll viewport resize and no
native scroll bounce. Re-grabbing an opening/settling sheet retains its
position. |
| Thumbnail disappears and reloads | 22.00–24.17 | Visibility cancels
unfinished work without clearing a loaded URI. Cache peek restores the
same immutable local URI before the first remount frame, allowing native
decoded bitmap reuse. Existing memory/disk LRU budgets and pairing
cleanup remain in force. |
| Feed displacement during interactions/card changes | 06.17–06.50,
10.75–11.17 | Stable composer reserve; no Android autoscroll-to-zero
threshold; existing disclosure anchor also wraps Run and visible WebView
height changes. The recording alone cannot separate every gesture
movement from layout correction. |

### Validation

- Passed with `nice`: `bun install`, `bun run gen:check`, workspace `bun
run typecheck`, mobile typecheck, repository `bun run lint`, `bun run
format`, `bun run format:check`, and integration-test workspace
typecheck.
- Passed 10 unit tests: existing private image cache and pure sheet
gesture tests, plus session consent isolation/revocation coverage. These
are local unit tests under the existing tests directory; no UI suite or
E2E tests were added or run.
- Additional Expo lint remains failing on existing repository findings:
clean dev has **116 errors / 25 warnings**, this change has **112 errors
/ 25 warnings**. Changed image/watchdog code removes some existing
findings; the remaining Expo failures are not claimed as passed.
- Native fingerprints match clean dev before/after, including explicit
`CANOPY_CHANNEL=nightly`, using `bunx expo-updates fingerprint:generate
--platform ...`. Nightly Android:
`141ef4e8c825ee4fc5d22c499402b284741b0970`; Nightly iOS:
`83794f069934a7374461427d89b8d008cec19d97`. Default-channel Android:
`906dc944f94eb8333fa384ed9f198834fdd30d13`; iOS:
`138e0c6b171c82b4933e86808cdfef56da73b8c6`. No dependencies, native
modules, plugins, or native config changed.
- **Device acceptance is unverified.** T3 device discovery found no
local Android SDK. MacStudio device hub timed out twice (no device
returned). EAS `device_open` failed: “frameAncestors and corsOrigins are
supported on Production and Enterprise plans,” while this account has
Starter. No emulator or physical device could be opened, so first-tap
rendering, Android WebView height/gesture handling, decoded bitmap
retention, snap motion, keyboard transitions, light/dark, and TalkBack
still need device review. No after-shots are claimed. Draft PR preserves
this outstanding gate.

No web files changed; web build was not run. Full
`check:tmp`/integration runs, native prebuilds/exports, EAS
builds/updates, tags, and releases were not run. Original frame strips
are retained outside the repository; raw extracted frames were removed.
No servers, device processes, or reserved ports were used.

### Copy audit (§8)

No new UI wording. `Run`, `Retry`, and `Custom HTML from the agent.`
remain unchanged from #758; no secrets notice was reintroduced. Changes
are session behavior, geometry, cache lifetime, and motion. Device
layout/accessibility checks remain unverified.
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