Web API, compilation and new improved web interface. - #1
Conversation
boludoz
commented
Aug 1, 2026

boludoz
commented
Aug 1, 2026
boludoz
commented
Aug 1, 2026
Automated compilation has been added; search has been fixed and improved. |
There was a problem hiding this comment.
Pull request overview
This PR significantly expands objdiff-web from a webview-focused UI into a standalone web experience by adding an HTTP API server, shared rendering utilities, and a revamped UI workflow (search, symbol navigation, sidebar) to support faster iteration and better discoverability.
Changes:
- Added a standalone ESM HTTP API server (
server/) with OpenAPI + agent instructions, symbol search, diff renderers (text/html/json), and optional build/watch capabilities. - Introduced a unified search UX (SearchBar, percent badges, symbol palette, project-wide symbol search results) and integrated it into Units/Symbols/Diff views.
- Refactored instruction/data row rendering into framework-agnostic shared modules (
shared/render/*) used by both web UI and server renderers.
Reviewed changes
Copilot reviewed 48 out of 50 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| webview/views/UnitsView.tsx | Adds file filtering UI + project-wide symbol search results section under unit list |
| webview/views/UnitsView.module.css | Makes units list shrinkable and adds empty-state styling |
| webview/views/SymbolsView.tsx | Implements TS-side symbol filtering + match highlighting + empty-state + count reporting |
| webview/views/SymbolsView.module.css | Adds styles for search highlighting, section row layout, and empty-state |
| webview/views/FunctionView.tsx | Switches instruction rendering to shared span renderer + adds data-flow color support |
| webview/views/FunctionView.module.css | Adds CSS for data-flow spans |
| webview/views/DiffView.tsx | Adds sidebar symbol list when a symbol is open, header SearchBar, percent badge, symbol palette |
| webview/views/DiffView.module.css | Adds sidebar layout styles |
| webview/views/DataView.tsx | Switches data rendering to shared span renderer |
| webview/util/symbolSearch.ts | New shared symbol filtering + range-splitting helpers for highlighting |
| webview/state.ts | Adds persistent search options/state; refactors diff-config application; improves state serialization |
| webview/mock.ts | Enhances dev mock to fetch config safely and optionally POST /api/build for browser builds |
| webview/common/SymbolSearchResults.tsx | New debounced project-wide symbol search results via /api/symbols |
| webview/common/SymbolSearchResults.module.css | Styles for symbol search results list |
| webview/common/SymbolPalette.tsx | New Ctrl+P / Ctrl+Shift+O command-palette style “go to symbol” overlay |
| webview/common/SymbolPalette.module.css | Styles for symbol palette overlay |
| webview/common/Sidebar.tsx | New resizable/collapsible sidebar component with Ctrl+B toggle |
| webview/common/Sidebar.module.css | Styles for sidebar layout + resizer |
| webview/common/SearchBar.tsx | New debounced search bar with mode/case/% toggles and result/error display |
| webview/common/SearchBar.module.css | Styles for SearchBar, toggles, status row |
| webview/common/PercentBadge.tsx | New percent badge component with optional progress bar |
| webview/common/PercentBadge.module.css | Styles for percent badge + bar |
| webview/App.tsx | Displays configuration-load errors in the UI (dev server) |
| webview/App.css | Adds shared CSS variables and styles for pre/code blocks + percent track |
| shared/render/data.ts | New shared data-row span renderer used by UI/server |
| shared/render/asm.ts | New shared instruction-row span renderer + helpers |
| shared/package.json | Marks shared as ESM for server-side direct imports |
| shared/messages.ts | Adds configError field to state message |
| shared/fuzzy.ts | Adds fuzzy matching utilities (including symbol-aware matching) |
| shared/diff-config.ts | New shared helper to apply config properties to WASM DiffConfig |
| server/index.ts | New HTTP API server with endpoints for health, units, symbols, diffs, build, file serving, etc. |
| server/wasm.ts | Node loader/bridge for objdiff-wasm (file: fetch support + init) |
| server/project.ts | Project root/config/unit resolution with path-escape protection + object reading |
| server/symbols.ts | Symbol search implementation (used by /api/symbols) |
| server/openapi.ts | Serves OpenAPI 3.1 schema at /api/openapi.json |
| server/instructions.ts | Serves agent-facing instructions (markdown/json) |
| server/instructions.md | Full agent usage guide content |
| server/render/rows.ts | Server-side diff row building using shared render spans |
| server/render/text.ts | Plain-text two-column diff renderer |
| server/render/html.ts | Self-contained HTML diff renderer |
| server/errors.ts | ApiError helper for clean HTTP error responses |
| server/build.ts | Build execution support with serialization + timeout + structured step output |
| server/watch.ts | Optional filesystem watching and rebuild-on-change support |
| server/desktop-config.ts | Reads last-used project root from objdiff desktop app settings |
| server/package.json | Marks server as ESM so objdiff-wasm (TLA) can load |
| scripts/dev.mjs | Runs API server + web dev server together with /api proxy |
| rsbuild.config.ts | Adds optional /api proxy mode + improves dev file-serving path safety + project-root resolution |
| package.json | Adds dev/api scripts for server + combined dev |
| AGENTS.md | Repository guidance for AI/agent workflows and key architecture notes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const handle = async (req: IncomingMessage, res: ServerResponse) => { | ||
| // Allow agents and the dev server to call this from another origin. | ||
| res.setHeader('Access-Control-Allow-Origin', '*'); | ||
| res.setHeader('Access-Control-Allow-Headers', 'Content-Type'); | ||
| res.setHeader('Cross-Origin-Resource-Policy', 'cross-origin'); | ||
| if (req.method === 'OPTIONS') { | ||
| res.writeHead(204).end(); | ||
| return; | ||
| } | ||
| const url = new URL( | ||
| req.url ?? '/', | ||
| `http://${req.headers.host ?? 'localhost'}`, | ||
| ); |
| <span> | ||
| No file matches <code>{search}</code> | ||
| </span> | ||
| <button type="button" onClick={() => setUnitsSearch(null)}> | ||
| Clear filter | ||
| </button> |
boludoz
commented
Aug 1, 2026
The productivity boost is massive; however, there are two issues: there is no separator for the ASM code, and symbol search (on main screen) isn't working. Bugs in the search function have been fixed. |



