Skip to content

fix(frontend): preserve side panel layout and catalog readiness - #6554

Closed
Guo-Yixin wants to merge 8 commits into
bytedance:mainfrom
Guo-Yixin:fix/browser-readiness-and-panel-layout-dev
Closed

Guo-Yixin wants to merge 8 commits into
bytedance:mainfrom
Guo-Yixin:fix/browser-readiness-and-panel-layout-dev

Conversation

@Guo-Yixin

@Guo-Yixin Guo-Yixin commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #6509, keeping the unrelated browser fixes separate as requested in review.

Relationship to #6509

These are separate, main-based PRs, split as requested in review. #6554 fixes existing browser/layout regressions and can land independently of #6509; it does not contain the batch-report feature.

For the final combined validation, my proposed sequence is:

  1. When fix(frontend): preserve side panel layout and catalog readiness #6554 is ready for acceptance, let that standalone fix land in main.
  2. I will then merge the updated main into feat(batch): inspect saved reports and captured evidence #6509 and rerun the complete validation for its resulting head.
  3. feat(batch): inspect saved reports and captured evidence #6509 can then be considered on its own native batch-report scope, with the browser fixes already supplied by main.

I will handle the branch update and validation. This is a proposed integration sequence, not a request to bypass review or official CI; maintainer preference determines landing order and timing.

Why

Reopening a restored Side Chat on a slower machine can reflow its history while the panel is still transitioning, producing visible scrolling. The extension catalog can expose enabled server-rendered buttons before its own client navigation handlers are ready, so an early details click can be lost.

What changed

Desktop panels keep their final content width pinned until the panel's actual CSS transition finishes. A reversed close cannot clear a newly reopened panel. Mobile Sheet exits retain their existing lifecycle.

The dynamically loaded extension gallery enables client-only actions after its own hydration. Installation-guide links remain available without JavaScript. The mobile navigation regression waits for the committed mobile layout before exercising its existing sidebar assertions. Live-compaction ordering waits for an atomic read containing both virtual rows while preserving immediate failure for the first reversed ordering result.

Surface area

  • Frontend UI — Side Chat panel transitions and extension catalog actions
  • Backend API
  • Agents / LangGraph
  • Sandbox
  • Skills
  • Dependencies
  • Default behavior change — early catalog actions wait for hydration
  • Docs / tests / CI only

Screenshots / Recording

Entry points are the existing chat-header Side Chat trigger and Capability Center → Extensions → View Agent teams. Playwright artifacts from the linked E2E runs capture these interactions; no new visual surface is introduced.

Bug fix verification

frontend/tests/e2e/sidecar-chat.spec.ts preserves its precise scroll and transform assertions and adds rapid close/reopen coverage. The unchanged restored-history case failed on all three attempts at #6509 head 0b0e4dc0, which contains official main 5ecc1c2a.

extension-gallery-hydration.dom.test.tsx checks real SSR markup followed by hydration: 2 failed before the readiness fix, 2 passed afterward. The delayed-script browser regression verifies that scripts are genuinely held, catalog navigation stays disabled, and one click after hydration opens the correct URL, title and installation guide.

The live-compaction ordering test could read null during a virtual-row replacement immediately after the answer visibility check. On node2 the unchanged assertion fails 5/20 zero-retry repetitions, all on a missing node; the corrected assertion passes 20/20. It waits only for a complete atomic DOM read. The first complete result must have the question before the answer; reversed order fails immediately. A controlled missing-to-correct sequence passes and reversed-to-correct is rejected. Test deadlines, skips and the later history/refresh checks are retained.

Validation

The final upstream merge includes MCP cache reconciliation, E2B filename quoting and Windows file-URI test corrections. Current-head full hosted backend validation and replay are complete and green. node2 also passes a fresh 4-case real-backend replay at integration 3b606f19, with retries disabled. The completed browser results below retain their actual tested SHAs; frontend and native batch fixture/router/projection source are unchanged by this merge. The updated integration head is 3b606f19; current complete backend, frontend, blocking-I/O, lint/build and replay checks pass. Complete default/auth browser results keep their original SHA labels because those sources are unchanged. The fresh node2 backend matrix is 733 passed / 6 platform skips, strict blocking-I/O 235, and real-backend replay 4 passed with retries disabled.

Published standalone head: 672f7d1fc63388fc78f01c4ec332f0bad9068f0f, incorporating official main 19befe76. Upstream #6552 supplies the cancellation cleanup fix; this PR changes no backend lifecycle code.

Standalone validation (current 672f7d1f; browser SHA specified below) Result
Full backend / PostgreSQL 17 / Redis 7 27,327 passed / 105 conditional skips; default collection 27,650
Full default / auth browser E2E a5077457: 394 / 5 passed; zero failed/flaky; byte-identical frontend at current head
Full frontend unit tests 2,772 passed / 293 files
Lint / guidance / format / types / production build All jobs succeeded
Real-backend replay / backend golden 4 / 1 passed; both jobs succeeded
Strict blocking-I/O 235 passed
node2 focused original regressions, 3 repetitions, zero retries 15 passed, including exact scroll, rapid reopen, both locales, slow hydration and mobile navigation
node2 live-compaction ordering red / green, 20 repetitions, zero retries Original: 5 failed / 15 passed, all failures null; corrected: 20 passed

For integration verification, c1a751043c5c6feea004aab705d28851b4f23201 combines this change and #6509. It is not the published head of either upstream PR.

Integration validation (current 3b606f19; browser SHA specified below) Result
Full backend / PostgreSQL 17 / Redis 7 27,374 passed / 105 conditional skips
Full default / auth E2E c1a75104: 399 / 5 passed; zero failed/flaky; byte-identical frontend and batch fixture
Full frontend unit tests 2,810 passed / 294 files
Lint / guidance / format / types / production build All jobs succeeded
Replay / golden Both jobs succeeded
Strict blocking-I/O 235 passed
node2 complete integration default/auth/replay, retries disabled c1a75104: 399 / 5 / 4 passed, zero failed and zero flaky; frontend unit 2,810 passed; check/format passed

node2 runs the existing complete default/auth/replay browser suites in an isolated Ubuntu 24.04 container with Node 24.21.0, pnpm 10.26.2 and pinned Playwright Chromium 1217. The latest full run disables retries. Only the production web-server startup allowance is extended to 900 seconds for VM resources; test deadlines, workers, scopes and assertions remain intact. Conditional backend skips are reported separately from passes.

A separate AI reviewer examined the panel animation/cancellation ownership, dynamically loaded gallery hydration and the final missing-row-only synchronization. No reproducible blocking finding remains. Official upstream workflows still require maintainer approval; personal-fork success does not substitute for their execution.

Diff against official main Added Removed
Production 62 18
Tests 173 21
Documentation 18 0
Code total 235 39
All text 253 39

AI assistance

Tool(s) used: Codex

How you used it: Codex reproduced the issues, implemented the fixes and regression tests, ran validation, and prepared this description. A separate AI reviewer examined the changes. Human review responsibility remains with the contributor.

  • I've read and understand every line of this change and take responsibility for it — it's not unreviewed AI output.

@github-actions github-actions Bot added area:docs Documentation and Markdown only area:frontend Next.js frontend under frontend/ risk:medium Medium risk: regular code changes size/M PR changes 100-300 lines labels Oct 9, 2026
@Guo-Yixin

Guo-Yixin commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor Author

@AnnaSuSu @ggnnggez Final update after merging official main 19befe76 without conflicts. #6554 is now at 672f7d1f; the native batch feature and separate browser corrections retain their review boundaries.

The complete current-head backend/PostgreSQL 17/Redis 7 workflow passes 27,327 tests / 105 conditional skips. Current frontend unit tests (2,772), strict blocking-I/O (235), lint/guidance/types/format/production build and replay/golden all pass. #6509's newly executed full default/auth browser workflow passes 398 / 5 with zero failures/flakes.

node2's fresh native/affected-upstream matrix at fc150be0 passes 733 / 6 platform skips, strict blocking-I/O 235 and guidance/lint/format/lock/diff. Fresh real-backend replay at integration 3b606f19 passes 4 cases with retries disabled. Its complete hosted backend also passes 27,374 / 105 conditional skips.

The complete node2 default/auth/replay browser 399 / 5 / 4, all 2,810 frontend tests and check/format passed at c1a75104, with retries disabled and zero failures/flakes. Frontend and native batch fixture/router/projection/service sources are byte-identical at 3b606f19, independently verified; the old run remains labeled with its actual SHA. Standalone browser 394 / 5 at a5077457 likewise covers byte-identical frontend sources at 672f7d1f. Updated runtime validation is recorded separately rather than relabeling old runs.

The original scroll/transform/order assertions are retained; the missing-row synchronization still rejects the first complete reversed ordering. Synthetic report auth/image/href coverage remains disclosed separately from real artifact HTTP response-byte testing. All nine #6509 inline threads remain resolved; AnnaSuSu's approval applies to the earlier reviewed native implementation. Official upstream workflows still need maintainer approval. The independent #6554 remains separate; #6509 will receive it after upstream acceptance.

Integration note: #6554 can land independently of #6509. My proposed integration sequence is to let #6554 land when ready, then I will update #6509 from main and rerun its complete validation before the batch feature is considered for acceptance. I will handle those follow-up steps; landing order and timing remain at maintainer discretion. This relationship is now stated at the top of both PR descriptions.

@Guo-Yixin

Copy link
Copy Markdown
Contributor Author

Closing this PR as requested so the earlier browser/layout follow-up is no longer left open. Its validation and review history remain available in the PR; no merge is requested.

@Guo-Yixin

Copy link
Copy Markdown
Contributor Author

Closing this PR as requested.

@Guo-Yixin Guo-Yixin closed this Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Documentation and Markdown only area:frontend Next.js frontend under frontend/ risk:medium Medium risk: regular code changes size/M PR changes 100-300 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant