Repository navigation
Draw a long document as a card you can read beside the conversation (#3114) - #3183
Merged
Merged
Conversation
…3114) A reply over the standard cap that carries two headings or three --- sections is drawn as a card in the bubble: title, section count, Open beside the conversation. It opens the whole text in the panel as the document view, and Show message text reads it in place. none folding draws no card.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Written-by: Dev
Fixes #3182
Part of #3114
Owner: Dev
Reviewer: Reviewer
Tier: T1
A reply that reads as a document — over the standard cap (12 lines / 800 characters) and either headed in two places or broken into three
---sections — is no longer drawn as a long bubble. The bubble carries one card instead: the first heading as its title, a{n} sectionscount and Open beside the conversation. The card opens the whole text in the right-hand panel as its owndocumentview, closable with × and closed again when the conversation moves on; Show message text under the card reads the whole text in place.nonefolding draws no card and the whole text, and a reply still streaming is never a card. The recognition reads headings and section breaks outside code blocks only — a heading inside one is content.foldBodygains two optional properties,actionsandsessionId, and only its two existing call sites pass them (cells.js,user-message.js). The thresholds, the preview,FoldedContentandfoldingOfare untouched, anddocumentCardsis not a stored preference in this slice — the card follows the folding mode (noneturns it off), as #3112's default does.{ "pr": 3183, "claim": "Dev", "issue": 3182, "summary": "A long message that reads as a document is drawn as one card in the bubble instead of a long folded reply: title, section count and Open beside the conversation. The card opens the whole text in the right-hand panel as a document view, closable with × and closed when the conversation changes; Show message text reads it in place. none folding and a streaming reply draw no card. The recognition counts headings and --- sections outside code blocks, and foldBody gained only two optional properties.", "files": [ "core/src/client/message-fold.js", "core/src/client/index.js", "core/src/client/browser-pane.js", "core/src/client/overlays.js", "core/src/client/cells.js", "core/src/client/user-message.js", "core/src/client/styles.js", "core/src/client/i18n.js", "core/test/message-fold.test.js", "docs/subsystems/core-client.md", "changelog.d/3114-document-cards.added.md" ], "checks": { "ran": "cd core && TZ=UTC node --import ./test/harness-resolve.mjs --test test/message-fold.test.js", "result": "green", "at": "c498c5aac80b27c7a51d1036046114e2863547a7" }, "next": "none — ready for review" }Verification at the tip c498c5a
Ran:
cd core && TZ=UTC node --import ./test/harness-resolve.mjs --test test/message-fold.test.js→# tests 9 / # pass 9 / # fail 0; with the document branch and the two call sites reverted the same command reads# tests 9 / # pass 6 / # fail 3, the three sentences this slice names (the bubble carries a document card0 !== 1,there is a card to open0 !== 1,+ 'Show more' / - 'Show message text').cd core && TZ=UTC node --import ./test/harness-resolve.mjs --test test/tool-cells.test.js test/empty-message-cell.test.js test/palette-preview.test.js test/client-bundle.test.js test/settings-readonly-pages.test.js test/bot-browsers.test.js test/earlier-message-actions.test.js→# tests 73 / # pass 73 / # fail 0(19, 3, 15, 2, 14, 14, 6).node core/scripts/build-client.mjs --checkfrom the repository root → exit 0, andgit diff --exit-code -- core/client.js→ exit 0, on the tree withcore/client.jscommitted.node scripts/ds-bot-patches.mjs check→ok 10 patches apply cleanly in orderandok core/ equals ds-bot/ + patches/ds-bot/;node scripts/ds-bot-patches.mjs canonical→generate is a no-op.npm --prefix core run arch-docs→arch-docs: OK (17 changed file(s));cd core && npm run lint→ 0 errors.TZ=UTC TMPDIR=/data/flybot-tmp npm run verify→ exit 0 (lint, arch-docs, build check, patches check/canonical, the core suite and both plugin suites, every block# fail 0).core/client.js, threepatches/ds-bot/*.patch, twopatches/ds-bot/files/mirrors). No gate file, nods-bot/, notopics.json, nods-bot.pin.json, nocore/src/host/, nocore/src/shared/, noplugins/.Not run:
2 sections, the panel with the same title and the last line of the text, × closing it,Show message textreturning the whole text to the bubble — is checked by those draws and by readingindex.js/overlays.js/browser-pane.jsby hand.npm ci/npm run harness: node_modules were carried over at the same dependency tree (version-only difference incore/package.jsonand its lockfile from the previous slice).core/index.jsand no host path changed.git fetchis unavailable (only api.github.com is reachable), soorigin/mainis a local ref to the base commit's tree and the branch is pushed through the Git data API.