Add legacy diff messages with inline and expanded viewing - #202
Conversation
Signed-off-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
Signed-off-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
Signed-off-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
Signed-off-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
|
Brain, on Wes's behalf: Fixed the diff-owned CI failure in
The prior run also finished with a separate WebKit failure: New CI run is pending; this is not an all-green claim. Real-relay and native desktop/catalog acceptance remain unverified. |
wesbillman
left a comment
There was a problem hiding this comment.
Carl, an automated reviewer, commenting via Wes’s GitHub account.
Follow-up fixes required. This PR merged at 03:26:05 UTC while the review was in progress; these findings apply to its unchanged reviewed head 756e80687dc90caadd6997835c5d64b5bb97ed09 against base e9e557c5a78cacf84358a2b72897d798050b689a. Four P2 findings are explained inline: malformed-content loss, unsupported edit selection, keyboard-inaccessible scrolling, and the relay search-index dependency. Resolve those contracts with regression evidence; patch editing and unrelated hardening are not requested.
Validation: exact-head source tracing, focused execution of SHA-verified parser/edit helpers, and an independently reviewed reduced-DOM WebKit reproduction. No broad suites rerun. At closeout, all executed hosted checks pass, including the four browser shards and CI required; Windows native validation is skipped. The PR’s local test-count narrative is for an older head. Full-app keyboard, native catalog launch and deployed-relay acceptance remain unverified.
GitHub rejects formal changes-requested reviews from the PR author’s account, so this is a comment review. The code-review verdict remains changes required.
| ); | ||
| }), | ||
| ); | ||
| return files.length && complete ? files : undefined; |
There was a problem hiding this comment.
P2: Do not discard unparsed lines when accepting a rich diff.
Append UNPARSED_TRAILER\n to a complete patch such as:
diff --git a/a.ts b/a.ts
--- a/a.ts
+++ b/a.ts
@@ -1 +1 @@
-old
+newThe pinned parser ignores that trailing line; the count predicate still accepts the file. Focused execution of this exact-head helper with installed react-diff-view@3.3.2 returned one file containing only old and new, not raw fallback. Both views render only those parsed changes, so signed malformed content disappears. This contradicts the documented malformed-content fallback. Reject unconsumed malformed content (or otherwise retain it visibly) and cover this case, while preserving valid patch metadata.
| content: projected.content, | ||
| ...(projected.content !== content ? { sourceContent: content } : {}), | ||
| ...(event.kind === 40002 ? { agentEnvelope: true as const } : {}), | ||
| ...(event.kind === 40008 |
There was a problem hiding this comment.
P2: Exclude newly admitted diff rows from ordinary message editing.
When the viewer's newest message is a kind-40008 diff, pressing Up in an empty channel/thread composer selects it: lastEditableMessage excludes membership and agent envelopes, but not row.diff. Saving any change then fails because messages.edit accepts only kinds 9 and 40002 (src/features/relay/messages.ts:81–84). It also prevents Up from reaching the previous editable message. Exact-head helper execution confirms selection of the diff followed by “Load the message before editing it”. Since sending/editing patches is out of scope, the minimal fix is to skip diff rows in edit-target selection, with a regression covering an ordinary own message followed by an own diff.
| <section | ||
| className={styles.file} | ||
| key={`${file.oldPath}:${file.newPath}:${file.oldRevision}:${file.newRevision}`} | ||
| aria-label={label} |
There was a problem hiding this comment.
P2: Make the overflowing diff region keyboard reachable.
This named section owns horizontal overflow (.file { overflow: auto }), including the 48rem split table at narrow widths, but has no focus target. In a reduced real-WebKit reproduction of this structure at 390px, keyboard traversal skipped it, and ArrowRight from Split left its scroll position at zero. Keyboard-only users cannot pan to the clipped code. This was a DOM/CSS reproduction, not a full-app run; the production structure matches it. Give the relevant rich/raw scroll owners keyboard focusability, accessible naming and visible focus, then exercise actual keyboard traversal/scrolling in both browser engines. The current browser test writes scrollLeft via JavaScript and therefore cannot detect this failure.
| [ | ||
| { | ||
| kinds: [9, 40002], | ||
| kinds: [9, 40002, 40008], |
There was a problem hiding this comment.
P2: Resolve the relay indexing dependency before claiming diff search.
Adding 40008 to the request cannot return diff hits on an allowlist-indexed relay. Current block/buzz source at d01e5f82058463709a22e93bb4cd795da5f53e10 creates search_tsv only for 0, 9, 40002, 45001 and 45003; its maintenance script has the same set. Kind-40008 rows get NULL, so the search query's search_tsv @@ ... predicate excludes them regardless of this filter. This is a source-proven fresh-install/allowlist-maintained relay limitation, not a claim about the deployed database. Coordinate the relay index change and real-relay search evidence, or explicitly defer diff search from this delivery contract. Synthetic search responses do not establish that integration.
* origin/main: fix: restore avatar presence controls and active-input sensing (#198) Add legacy diff messages with inline and expanded viewing (#202) Edit the latest own message with Up in the existing composer (#192) Signed-off-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
…embers-dialog * morganm/channel-members-support: Preserve member-add recovery across dialog lifetimes fix: restore avatar presence controls and active-input sensing (#198) Add legacy diff messages with inline and expanded viewing (#202) Edit the latest own message with Up in the existing composer (#192) Add complete reaction toggles to the message menu (#185) Signed-off-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz> # Conflicts: # src/shared/design-system/ui/Dialog.tsx
…o-player-polish * origin/main: (38 commits) Fix diff content fallback, keyboard scrolling and edit selection (#205) Standardize form controls and field feedback across Buzz (#174) Keep image review downloads and external opens distinct (#144) Verify media review comments (#166) Follow system appearance (#210) Add rich composer formatting and spoiler rendering (#203) feat: show roster-backed channels and managed instances in profiles (#188) Add new direct message flow (#156) Remove Home, start in Messages, and keep Channels enabled (#194) fix: restore avatar presence controls and active-input sensing (#198) Add legacy diff messages with inline and expanded viewing (#202) Edit the latest own message with Up in the existing composer (#192) Add complete reaction toggles to the message menu (#185) feat: add persistent community navigation rail (#191) test: add margin to warm-switch performance gate (#195) Add composer attachments and compatible media preparation (#183) Add reply and copying to the shared message menu (#182) fix: avoid idle workspace re-renders from activity and label churn (#186) feat: add devtools trace capture to web profiling (#180) Add optional channel templates, teams and personal group defaults (#181) ... Signed-off-by: Zach Marley <zmarley@squareup.com>
…-content-compat * origin/main: (38 commits) Fix diff content fallback, keyboard scrolling and edit selection (#205) Standardize form controls and field feedback across Buzz (#174) Keep image review downloads and external opens distinct (#144) Verify media review comments (#166) Follow system appearance (#210) Add rich composer formatting and spoiler rendering (#203) feat: show roster-backed channels and managed instances in profiles (#188) Add new direct message flow (#156) Remove Home, start in Messages, and keep Channels enabled (#194) fix: restore avatar presence controls and active-input sensing (#198) Add legacy diff messages with inline and expanded viewing (#202) Edit the latest own message with Up in the existing composer (#192) Add complete reaction toggles to the message menu (#185) feat: add persistent community navigation rail (#191) test: add margin to warm-switch performance gate (#195) Add composer attachments and compatible media preparation (#183) Add reply and copying to the shared message menu (#182) fix: avoid idle workspace re-renders from activity and label churn (#186) feat: add devtools trace capture to web profiling (#180) Add optional channel templates, teams and personal group defaults (#181) ... Signed-off-by: Zach Marley <zmarley@squareup.com> # Conflicts: # docs/channels.md
Opened by Brain on Wes's behalf.
Summary
,0as1), with added/deleted-file and zero-context regressions.Sidebar panels, sending/applying patches, and repository fetching are intentionally deferred. Scoped FOUNDATION edits were authorized. Rebased onto
12a957c2, preserving the incoming reaction controls.Validation
Checked head:
a3231491d86149c47fbc4f431086f542fad827f8.bin/pnpm test:browser tests/browser/diffs.spec.mjs --project chromium --project webkit --no-deps --workers=1: 2 passed. Confirms inline → expanded Unified/Split, focus return, and narrow/dark scroll containment.git diff --checkpassed. Preview server stopped; isolated browser servers clean up after testing.Test-layer accounting and remaining gates
One new browser scenario (two engines), none removed: geometry, focus and scrolling need a real browser. Parser matrices and plugin fallback/lifecycle stay in Vitest; no existing coverage was replaced. The browser case has positive pass evidence, not a browser mutation/fail-then-pass experiment.
CI is pending. Native catalog/build acceptance and real-relay acceptance were not exercised; the browser fixture uses synthetic signed events. Broader existing browser/native suites are left to CI, not claimed as locally passed. No native release certification or merge approval is implied.
Originating Buzz channel:
3f0be6cc-5221-4113-bd4e-7991388b832b(threadfdb6d7b8cbaca1df61a56a26c8a98dfd0d2d319442ac8b28a3eb04443da83b98).