Skip to content

web: ship the editors and .odm tools behind real routes - #1182

Closed
Mearman wants to merge 0 commit into
mainfrom
fix/1096-web-tools
Closed

web: ship the editors and .odm tools behind real routes#1182
Mearman wants to merge 0 commit into
mainfrom
fix/1096-web-tools

Conversation

@Mearman

@Mearman Mearman commented Sep 10, 2026

Copy link
Copy Markdown
Member

Closes #1096. Package/JSON and .odb had already landed under concurrent sessions (verified, untouched); this ships the two remaining stubs:

  • .odm: an odm.render rpc procedure wrapping odmToPdf with a caller-supplied chapter map -- the master's external .odt references resolve from a second file picker, matched by href; OdmUnresolvedSectionError crosses the boundary as typed data, and the route renders the named still-missing chapter list as its core UX alongside the PDF in the browser's native viewer
  • Editors: worker-held live-view editor sessions (open/setParagraphText/addParagraph/removeParagraph/save) over documents.js's docx/odt/doc/markdown editors -- one UI driving all four formats through the identical five procedures, save re-serialising through each format's own writer. Set-text is position-preserving; per-run styling deliberately waits for a genuine cross-format surface (stated in the route's comment)

Both tools activate in NAV_ITEMS and the PLANNED_ITEMS block is gone. Full vite build (with PWA precache) green; two new rpc round-trip tests.

Closes #1096.

@Mearman
Mearman marked this pull request as ready for review September 10, 2026 04:36
@Mearman

Mearman commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

@codex security review

@Mearman
Mearman enabled auto-merge (rebase) September 10, 2026 04:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-09-10T04:54:22.788036Z 1353c3e Manual request

Security findings

Advisory findings (1)

ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Mearman Mearman closed this Sep 10, 2026
auto-merge was automatically disabled September 10, 2026 04:44

Pull request was closed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review

Here are some automated security review suggestions for this pull request.

Reviewed commit: 1353c3e288

ℹ️ 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.

Comment thread packages/web/src/rpc/router.ts Outdated
Comment on lines +734 to +736
const pdf = odmToPdf(input.master, {
resolveSubDocument: (href) => byHref.get(href),
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review

P2 Badge Security: Bound expansion across repeated ODM chapters

When a victim selects an attacker-supplied .odm and a matching chapter, bound cumulative chapter expansion before calling odmToPdf. A master can repeat one href thousands of times; this resolver returns the same bytes each time, and odmToPdf decodes, retains, and lays out the chapter for every section. A 14,671-byte 5,000-section master plus a 1,450-byte ODT holding 1 MiB of text materializes at least 4.88 GiB of text, exhausting the worker/tab. Zod checks only types and no cancellation signal is passed.

SECURITY.md reference: SECURITY.md:L15-L18

Useful? React with 👍 / 👎.

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.

The web UI's four headline tools (Editors, .odb, .odm, Package / JSON) are permanent nav stubs

1 participant