Skip to content

diffr web: search, onboarding, summaries, agent tools, and a build that fits CI - #1022

Open
milanb17 wants to merge 25 commits into
mb/diffr-web-interface-9a6716from
claude/project-thread-hwb7l0
Open

milanb17 wants to merge 25 commits into
mb/diffr-web-interface-9a6716from
claude/project-thread-hwb7l0

Conversation

@milanb17

@milanb17 milanb17 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add file/text search, onboarding, summaries, agent tools, caching, and a usable mobile interface to diffr web. Stacks on #1018; merge #1018 first.

Mobile header → animated file-tree sheet → file navigation
Touch scrolling + native selection → Monaco structural folding
GitHub sources → workers → cached diffs → optional summaries
  • ⌘P opens files and ⌘F searches diffed text. Onboarding supports optional GitHub and summarizer credentials. Config settings expose their reference.
  • Summaries run after the initial diff and fold long bodies behind pseudocode. WebMCP tools expose comparison data, lenses, and optional fold plugins. Results are cached in IndexedDB.
  • Mobile uses a compact header, desktop-style tree with change indicators/counts, native vertical inertia and text copying, and horizontal swipes with momentum for unwrapped code. Structural fold controls remain available, including touch targets and pinch handling. Sheet/menu animations respect reduced motion; Safari keeps the file sheet open through its exit animation. Long summaries pan without truncation, shared scrollbars remain above diffs, and phone landscape keeps mobile controls.
  • Scroll updates only reposition visible fold controls instead of rebuilding decorations for every function. Native scrolling avoids redundant position writes during viewport height changes, and Safari focus cannot shift the virtual content wrapper sideways.
  • Worker failures now terminate the pool, reject pending calls, and ignore late responses. Streaming updates preserve open display/theme menus; native popover toggles prevent a dismissal from immediately reopening the menu.

Evidence

  • Final mobile stress runs: Chromium 241 seconds at 4× CPU throttling and WebKit 244 seconds, across eight portrait/landscape sizes. Combined: 188 menu, 188 sheet, 188 fold, 282 swipe, and 94 copy-handler checks; zero page errors. WebKit gestures are synthetic because Playwright lacks native touch drag; its timing includes long frames during repeated resize/fold work.

  • A separate 240-second WebKit steady-scroll run traversed 359,734 pixels through 300 functions: 18 ms p95, 28 ms maximum frame intervals, zero intervals above 50 ms, no page errors, and a passing function-fold check afterward. This drives the scroller programmatically, not native iOS touch inertia.

  • A 300-function scroll probe at 4× CPU throttling reduced p95 fold-control update cost from 77.9 ms to 1.0 ms. Repeated height changes during swipes reduced redundant native scroll-position writes from 19 to zero.

  • Before: horizontal swipes did not move long code lines with wrapping off. After: the same mobile Chromium swipe moves code 313px; vertical scrolling, structural fold taps, and copying still pass.

  • Mobile Chromium and WebKit end-to-end checks cover real GitHub data and WASM diffs, file tree/search/status filters/navigation, structural folding, copy, animations, and reduced motion. Responsive layout checked from 320px to desktop width.

  • The preceding revision was checked in the native iPhone simulator for file navigation, fold taps, and horizontal/vertical scrolling. The latest mobile polish could not be rechecked natively because the Mac was locked. Native iOS pinch remains unverified: the available automation did not deliver a reliable two-finger gesture.

  • Failure-injection check verifies pending/new calls reject, workers terminate, late responses are ignored, and counters reset.

  • Rebuilt WASM, seven browser-engine Rust tests, 15 Whiteboard/diffr integration tests, browser typecheck/build, and the full repository pnpm run ci suite pass locally. Fresh GitHub checks validate this restacked head; see the checks tab for current status.

Merge Danger

Door: two-way; code and deployments can be reverted.

Blast Radius: browser UI and worker lifecycle, plus native summarizer/plugin support. Agent plugins execute JavaScript in a worker that can hold the summarizer key, so only trusted plugins should be installed. Mobile viewport behavior and touch handling differ from desktop; native iOS pinch needs manual validation. No production deployment occurs from this PR's preview workflow.

@milanb17 milanb17 self-assigned this Oct 8, 2026
@milanb17
milanb17 force-pushed the claude/project-thread-hwb7l0 branch from f2f27f9 to e37ee65 Compare October 8, 2026 18:43
@milanb17
milanb17 force-pushed the claude/project-thread-hwb7l0 branch 2 times, most recently from 5d66b5c to d61d01e Compare October 9, 2026 06:12
@milanb17
milanb17 force-pushed the claude/project-thread-hwb7l0 branch from 0dfaeb4 to e1f3ad4 Compare October 9, 2026 17:29
@milanb17
milanb17 added this pull request to stack #1015 October 9, 2026 19:05
claude and others added 20 commits October 9, 2026 16:34
The plugin links natively into diffr-web and reaches its model through a
synchronous request the worker makes. It runs in a second pass, so a
file shows first and its summaries follow. The page's settings merge
over config.toml as JSON overrides.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ns4ZYciirL61M66WFtLXRp
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Cmd+P goes to a file and Cmd+F finds text in every diffed file. A first
visit asks for a GitHub token and a summarizer key, both skippable, and
the settings explain diffr's configuration with a reference to every
key. WebMCP tools let an agent read the comparison, save lenses, and
install plugins that fold regions. The file tree follows the scroll, a
hidden file opens to its text, line numbers keep clear of the splitter,
and idle workers stop.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ns4ZYciirL61M66WFtLXRp
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
…terTool

Chrome moved WebMCP to document.modelContext, and the current draft
dropped provideContext for registerTool, which returns a promise.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ns4ZYciirL61M66WFtLXRp
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Opening a comparison again shows each file's diff and summaries without
fetching, diffing or calling the model again. Entries are named by the
commits, the file, the engine build and its configuration; past 512 MB
the ones read longest ago go. Settings and the engine panel show the
cache's size, and Settings can clear it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ns4ZYciirL61M66WFtLXRp
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
The model's answer loses the code fence models wrap it in, a docstring
opened on a line of its own is led by its first words instead of a bare
/**, and the page draws summaries upright in the editor's colour rather
than as faint italic comments.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ns4ZYciirL61M66WFtLXRp
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
A browser that once held a different diffr-cache database kept the
cache off.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ns4ZYciirL61M66WFtLXRp
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
The file tree and the diff leave out every file outside the lens, and
the summary counts only its files, as "7 of 32 files". All files lists
everything again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: 0e3ef086-d04d-46f7-a982-868add70ee04
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
…ing controls

Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a121b0-989d-70f2-af0e-3053592e6839
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a121b0-989d-70f2-af0e-3053592e6839
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a121b0-989d-70f2-af0e-3053592e6839
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a121bc-677b-7a70-a558-53bb1365164c
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a121bc-677b-7a70-a558-53bb1365164c
Agent-Session: 10dc1e44-eba6-438e-b46d-1228abd8fd81
Agent-Session: e137d86a-da30-480f-9f2f-152b1946fef2
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a121bc-677b-7a70-a558-53bb1365164c
Agent-Session: 10dc1e44-eba6-438e-b46d-1228abd8fd81
Agent-Session: e137d86a-da30-480f-9f2f-152b1946fef2
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a121bc-677b-7a70-a558-53bb1365164c
Agent-Session: 10dc1e44-eba6-438e-b46d-1228abd8fd81
Agent-Session: e137d86a-da30-480f-9f2f-152b1946fef2
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a121bc-677b-7a70-a558-53bb1365164c
Agent-Session: 10dc1e44-eba6-438e-b46d-1228abd8fd81
Agent-Session: e137d86a-da30-480f-9f2f-152b1946fef2
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a121bc-677b-7a70-a558-53bb1365164c
Agent-Session: 10dc1e44-eba6-438e-b46d-1228abd8fd81
Agent-Session: e137d86a-da30-480f-9f2f-152b1946fef2
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a121bc-677b-7a70-a558-53bb1365164c
Agent-Session: 10dc1e44-eba6-438e-b46d-1228abd8fd81
Agent-Session: e137d86a-da30-480f-9f2f-152b1946fef2
Agent-Session: 01a11e9f-d478-7a50-b799-c97cc8a58020
Agent-Session: 01a121bc-677b-7a70-a558-53bb1365164c
Agent-Session: 10dc1e44-eba6-438e-b46d-1228abd8fd81
Agent-Session: e137d86a-da30-480f-9f2f-152b1946fef2
@milanb17
milanb17 force-pushed the claude/project-thread-hwb7l0 branch from 1680e20 to 5df4eae Compare October 9, 2026 23:34

This branch has not been deployed

No deployments
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.

3 participants