Skip to content

Leave the conversation out of an exported page - #5715

Merged
max-sixty merged 3 commits into
mainfrom
agent-ad9c47e7140aaafa6
Nov 8, 2026
Merged

max-sixty merged 3 commits into
mainfrom
agent-ad9c47e7140aaafa6

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

An export goes to people who shouldn't see the conversation with the agent, and the decision on #4070 is that none of it is in the file. An export used to embed the page's whole reading and turn the thread surface off, so a recipient couldn't read the discussion on the page, but anyone reading the file's source could.

What an export holds

An export's reading now folds from the part of the log that changes the page (_page_log in exporting.py): actions and reports on page widgets, their undos, and stamps. Each stamp's changelog is blanked, and each event's session is removed. The capture takes no process facts (capture_page_snapshot with process=False), so the agent's live activity, session name and working directory stay out. The file holds only the data sources the page's markup binds (_page_data), since a widget in a message can bind one. Media named only by a message was never captured.

Threads, obligations, queues, to-dos, the plan, activity and history are all readings of that log, so none of them has a message to carry, and an event kind _page_log doesn't name stays out. Widgets keep the state the user recorded, and an undone choice stays undone.

Rejected designs

This rejects both other readings of #4070, as the exporting.py header records. Keeping the threads embedded with their surface off is the leak this change closes. Showing them read-only, as the issue suggested, puts the discussion in front of the same people.

What the runtime loses

With no threads to hide, the runtime loses threadAvailable (leaf.js, application.js, thread/presentation.js), and the thread pass runs offline over an empty list, as it does on any page with no threads. A widget's thread seat used to draw a composer in an export that could send nothing, so threadBox now returns null there. The x-thread-seat text in the registry's $keys, which the site's key reference is generated from, and module-annotations.md both say so.

_module_urls no longer reads message markup, so a widget that only a message names brings no module. export_document no longer blanks others, since a capture with no process holds no neighboring pages. serving-pages.md, docs/how-it-works.html and the help for leaf page export say what the file holds and leaves out.

Tests

test_an_export_holds_the_page_and_nothing_of_the_conversation plants a word in each part of the conversation: a comment and the passage it quotes, an attachment, a reply carrying a widget and the data that widget binds, a pick on that widget, a thread title, a to-do and its status, a plan, the agent's live activity, both changelogs, and the session's working directory. It checks that each word is in the live reading, then finds none of them in the exported file or its decoded resources. The page's own data stays, the recorded choice stands, and the undone one stays undone. The offline browser test now also checks that a thread on a seated widget, and the box to start one, are absent from the export.

Run on the merge with main (9a7a55412):

  • uv run pytest tests/model/test_render_export.py tests/model/test_module_url_delivery.py: 90 passed
  • tests/browser/test_render_export.py by node id, the two tests this changes plus test_interactive_export_with_an_obligation_reaches_application_presentation, test_an_export_runs_what_its_served_page_runs and test_an_export_s_preview_takes_escape_before_the_dialog_around_it: 6 passed
  • pnpm run test:runtime: 898 passed
  • pnpm run check: passed
  • pre-commit run --files on the changed files: passed

Closes #4070

This was written by Claude Code on behalf of max-sixty

An export goes to people who shouldn't see the conversation with the agent, and the
decision on #4070 is that none of it is in the file. An export used to embed the page's
whole reading and turn the thread surface off, so a recipient couldn't read the
discussion on the page while anyone reading the file's source could.

An export's reading now folds from the part of the log that changes the page: actions
and reports on page widgets, their undos, and stamps, with each changelog blanked and
each event's session removed. The capture takes no process facts, so the agent's live
activity, session name and working directory stay out, and it holds only the data
sources the page's markup binds, since a widget in a message can bind one. Media named
only by a message was never captured. Threads, obligations, queues, to-dos, the plan,
activity and history are all readings of that log, so none of them has a message to
carry, and an event kind `_page_log` doesn't name stays out. Widgets keep the state the
user recorded, and an undone choice stays undone.

This rejects both other readings of the issue, as the `exporting.py` header records:
keeping the threads embedded with their surface off is the leak, and showing them
read-only shows the discussion to the same people.

With no threads to hide, the runtime loses `threadAvailable`, and the thread pass runs
offline over an empty list as it does on any page with no threads. A widget's thread
seat used to draw a composer in an export that could send nothing, so `threadBox` now
returns null there. `_module_urls` no longer reads message markup, so a widget only a
message names brings no module, and `export_document` no longer blanks `others`, since
a capture with no process holds no neighbours.
threadBox returns null on an exported page since the export strip, as
module-annotations.md says; the registry's $keys text, which the site's key
reference is generated from, still named only thread markup and quoted content.
@max-sixty
max-sixty merged commit e131696 into main Nov 8, 2026
5 checks passed
@max-sixty
max-sixty deleted the agent-ad9c47e7140aaafa6 branch November 8, 2026 21:45
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.

Decide whether an exported page carries its threads

2 participants