Repository navigation
App: Markdown, code, diagrams, charts, and files beside - #81
Conversation
The libraries the next commit draws messages with, unmodified apart from dropping source-map comments and wrapping vega-interpreter's ES module to read vega-util from the vega global, so all of Vega is one lazily loaded file. Versions and licenses in LICENSES.txt: marked 18.0.13, highlight.js 11.12.0 (common languages), Mermaid 11.17.2, Vega 6.4.0, Vega-Lite 6.4.3, vega-interpreter 2.3.2. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
Messages draw as Markdown with highlighted code, Mermaid diagrams, Vega-Lite charts (static SVG, data from the spec only) and ```html blocks as previews in a sandboxed frame with no network. Streaming draws each finished block once; the block still being written stays plain text. A message is parsed once and its HTML kept with the item. A path in a read, write or edit step, or a message's link to a path, opens that file in the pane beside, drawn by its kind. The core gains read_file (first 4 MiB, this machine only) and open_link (http, https and mailto in the default browser). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (6)
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae03a0f924
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
An ```html block in a message now opens as code and runs only when its preview is clicked: a preview's scripts share the window's thread, so a page a model wrote must not run merely by appearing. Hiding it removes the frame. Previews someone ran run again when the pane is redrawn. Diagrams and charts draw as they come near the screen instead of all at once, and a reader below one that draws keeps their place. The drawn-SVG cache is bounded by bytes as well as count, and keys a chart by width. Drawing a message past the chat's decoded-byte bound now folds the oldest bodies. CSV files keep quoted fields whole. An open file closes with the agent or store it came from. read_file reads regular files only, so a FIFO or device cannot hold a blocking thread. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8251a343dd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 8251a343dd
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
A chart in a message now opens as its spec and draws with a click, like an HTML preview: Vega runs on the window's thread, and a short spec (a sequence transform to a billion, a billion ticks) can ask for more than it can draw. A chart drawn once shows again from the cache when its pane is redrawn, and a chart file someone opens draws at once. Mermaid keeps drawing near view; it bounds its own work. A read, write or edit step keeps the path it named, whole, beside its shortened summary, so its link and the reload after a write use the real path. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
Mermaid fetches a node's `img:` URL, and a `url()` in its theme CSS, while it draws, so a diagram in a reply could make a request a model chose. The window's policy now takes images, fonts, media and stylesheets only from the app, data: and blob:; such a diagram fails with the reason in its head and nothing is fetched. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3978bbf849
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
An ```svg block in a message now opens as code and draws with a click, like HTML and charts: its filters and animations run on the window's thread. A data: SVG image in Markdown shows as its text. A preview is no longer remembered by its source, which ran every block with the same source after a redraw and kept their text alive; running is asked of one block, once, and a redraw shows it as code again. CSV and TSV tables keep at most 256 columns, so a line of separators costs no more than a wide table. A chat covered by a file beside is off screen: its finished turn is marked unseen, and seen once the file closes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9200ed68d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: b9200ed68d
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
A link the system opener refuses (no xdg-open, a failed open) now shows why in a toast instead of doing nothing. The streaming scan remembers how far an unfinished line was searched, so a long line arriving in pieces is searched once. A diagram queued behind the same source takes the first one's result, and a drawing larger than the whole cache budget is shown but not kept. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
There was a problem hiding this comment.
💡 Codex Review
Lines 699 to 700 in fb12c61
When a read/write/edit call's JSON exceeds the daemon's 2,048-character event preview, arguments_truncated is true and the partial JSON usually cannot produce row.path. If the full committed call was decoded first, this branch preserves its summary and background flag but Object.assign immediately overwrites its path with undefined, so supported 2,049–4,096-character paths lose both their file link and write-triggered refresh. The fresh evidence after the earlier path fix is that path was not added to the fields preserved for a truncated duplicate event.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Mermaid lays out on the window's thread and its size limits do not bound layout work: a 29-byte block-beta diagram with space:500000 holds the window. Diagrams in a message now open as source like charts, html and svg, and draw on a click; files opened beside the chat still draw at once. The scroll watcher is gone. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
… #section Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 333aa91b42
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ck the render bench A raster data: image can decode far larger than its bytes and an animated one takes CPU while shown, so it now waits for a click like every other heavy block. A relative image target becomes a file link. The rendering benchmark behind docs/APP.md's numbers is now app/bench/render.cjs. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: afb2e839c9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A Mermaid click link is an SVG <a xlink:href> outside .md's anchor guard, so clicking it navigated the window to the model's URL. Every anchor in drawn content now opens only through open_link, or not at all. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d1fc16fa3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…nks; ~name is the folder's A GFM row is padded to its header's width, so a wide header and short rows could ask the window for millions of cells; a table past 256 columns or 10,000 cells now shows as its source. The middle-click guard covers every anchor in drawn content, xlink:href included. Only ~/ means home when resolving a linked path. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1fc68d9b53
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce04094e33
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
marked's inline parsing grows faster than its input on runs like a line of '!': 3.2 s at 40,000 characters against 217 ms at 10,000. markdown-it 14.1.0 (vendored with its bundled linkify-it, mdurl, uc.micro, entities and punycode.js; registry integrity checked) grows with its input on the same runs. The renderer is ported rule for rule: fences and indented code go through block(), links and images keep their opener and target budget, an oversized table shows as its source before its cells are parsed, and task items keep their boxes. '!', a backslash and '&' now count as marks, and a message's parsed marks count toward the window's bound. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
|
You have reached your Codex usage limits for security reviews. Please try again later. |
…s the keyboard in the visible composer; SVGs with comments before the root draw A tool_completed marked failed or denied no longer reloads the file beside. A click in the side pane while a file is open focuses the main composer, as the side one is hidden. An SVG is recognised after an XML declaration, comments and a doctype, read in one pass. Rich's attribute for a block drawn at once is data-page, so it no longer shares a name with a step's data-run. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb80f4d962
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…are charged escaped; marks parsed are shared across a message's blocks; a file beside skips the live clock; a pane drawn whole keeps the reader's place once Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5cc391ff79
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…; highlighting arriving redraws only a pane with code waiting for it Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dde4bcff75
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…osed and opened again never reuses the view key of the one before Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e505eeada
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ile drawn again keeps the reader's place Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
|
You have reached your Codex usage limits for security reviews. Please try again later. |
…e inside a preview reaches the window Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
|
You have reached your Codex usage limits for security reviews. Please try again later. |
…n and draws from the cache Drops the per-block consent ids (message node, position, source digest), the remembered set and its store reset, and the anchoring switch a whole-pane redraw needed for blocks restored from it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01L7djWGZLxGzzTF3RkEShDN
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: deab543f63
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Findings deferred at merge are logged in #97. Generated by Claude Code |
Before: a reply showed as monospace lines. Only bold, inline code and code fences were recognized, and fences had no highlighting. A path in a step or a message was plain text.
After: replies show as Markdown with headings, lists, tables and links. Code blocks are highlighted and have a copy button.
Diagrams, charts, HTML, SVG and inline images in a message open as their source and draw only when clicked:
```mermaiddraws with diagram.```vega-litedraws with chart.```htmlruns as a page with preview.```svgdraws with preview.While a reply streams, each paragraph or block draws as soon as it ends. Clicking a path in a read, write or edit step, or a message's link to a path (images included), opens that file beside the chat, drawn by its type.
Model output never becomes app markup unparsed, and drawing a message never fetches a URL the model chose:
data:andblob:. That also covers what Mermaid draws.block-betadiagram withspace:500000sequenceto a billionframe-src about:stops it from navigating its own frame.How.
app/ui/rich.jsturns text into HTML with markdown-it, highlight.js, Mermaid and Vega. highlight.js, Mermaid and Vega are vendored in the first commit, so review can skip it. markdown-it 14.1.0 replaced marked in 023fd3e, which George approved: marked's time grew faster than its input on runs like a line of!(217 ms at 10k characters, 3.2 s at 40k), while markdown-it's grows with its input. highlight.js, Mermaid and Vega load the first time something needs them.app.jscaches each message's HTML on its item. When highlighting loads, only messages whose code waited for it are parsed again. Cached HTML, 40 bytes per drawn tag and 16 per parsed mark count toward the window's decoded-byte bound, so a window holds about 200,000 drawn tags and 500,000 parsed marks however its messages split them; drawing past the bound folds the oldest bodies. Drawn diagrams and charts are cached by source, up to 64 entries and 8 MiB. The streaming tail scans only new characters for block ends.The file view reuses the side pane (
S.ui.file) and closes with the agent or store it came from. The core gains two commands:read_filereads regular files only, up to the first 4 MiB, and refuses a window on an SSH host by name.open_linkopens a link in the default browser.There is no daemon change. Details and the threat checks are in docs/APP.md under "Messages".
Cost. Measured with
node app/bench/render.cjsat 023fd3e (markdown-it) in headless Chromium 141 on a 4-core container: three runs, each the median of nine, over 400 messages (292 KiB). The old markup is laid out under its own stylesheet from b7bdfe4. Layout times on this container vary widely: these runs had the new page at 2.0 to 2.4 times the old, and seven runs at a038530 had it at 0.55 to 3.6 times, 1.3 at the median.Checks run:
node --test app/tests/state.test.cjspasses 179 of 179 with main (46c8159) merged in.cargo test -p agent-apppasses exceptno_ssh_config_changes_what_the_app_forces. That test fails only because the container has nosshbinary.cargo clippy -p agent-app --all-targetsandcargo fmtare clean.Needs a look on the Mac: none of this has run in WKWebView yet. Check that clicking diagram, chart and preview draws each one, that a link opens the browser, and that a file opens beside the chat.
🤖 Generated with Claude Code
Generated by Claude Code