Conversation
…ook Core port Add a browser proof on the current Angular notebook route host. The proof harness bootstraps the production WorkspaceModule and NotebookModule lazy routes, reads the activated /notebook/:noteId and /notebook/:noteId/revision/:revisionId parameters into one host-owned test Core, and passes its NotebookCorePort to the separately built React test consumer, which reads the snapshot and receives route-driven subscription updates. The proof asserts that the port exposes only getSnapshot and subscribe, and that route activation and port consumption make no bootstrap, connect or close call, so the physical WebSocket lifecycle stays with the shell. It also fails on errors Angular's ErrorHandler logs, so a production component that throws against an incomplete test double cannot pass silently. The route proof runs with the port identity proof in the integration-test phase of -Pweb-e2e, on the anonymous leg only. Co-authored-by: YONGJAE LEE (이용재) <dev.yongjaelee@gmail.com>
voidmatcha
reviewed
Oct 3, 2026
| }); | ||
| const address = server.address(); | ||
| assert.ok(address && typeof address === 'object'); | ||
| const browser = await chromium.launch(); |
Member
There was a problem hiding this comment.
If Chromium fails to launch, the harness never returns its cleanup handle, leaving the HTTP server open. We close local test servers on failure in capture-fixtures.spec.ts. Could we cover this failure path here too?
Suggested change
| const browser = await chromium.launch(); | |
| let browser; | |
| try { | |
| browser = await chromium.launch(); | |
| } catch (error) { | |
| await new Promise(resolve => server.close(resolve)); | |
| throw error; | |
| } |
Contributor
Author
There was a problem hiding this comment.
Applied in f38120b. I named the callback resolveClose instead of resolve, because this file imports resolve from node:path. I checked the failure path by pointing PLAYWRIGHT_BROWSERS_PATH at an empty directory. Before the change the process never exited because the server stayed open. After it, the proof fails immediately with the launch error.
This branch has not been deployed
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.
What is this PR for?
Add a browser proof that the current Angular notebook route can hand one host-owned
NotebookCorePortto a separately built React consumer. This builds on the ZEPPELIN-6674 port identity proof and moves it onto the real notebook route.WorkspaceModuleandNotebookModulelazy routes and asserts that the activated component is the productionNotebookComponent./notebook/:noteIdand/notebook/:noteId/revision/:revisionIdparameters into one host-owned test Core. The React consumer reads the snapshot and receives route-driven subscription updates (note → other note → revision), always through the same port object.MessageServicedouble records the production component'sgetNote,noteRevisionandlistRevisionHistoryrequests, and the test asserts their exact order.This is a seam-only proof. It does not switch the production renderer, move notebook state out of Angular, or implement re-subscription, recovery or mutation reducers (ZEPPELIN-6687).
The implementation is based on the
ZEPPELIN-6675-notebook-route-boundarybranch in the voidmatcha fork (823183338), which was written before ZEPPELIN-6674 merged. Porting it onto currentmaster:integration-testphase behindweb.e2e.core.port.proof.disabled, the same as the merged port identity proof, so it runs on the anonymous leg ofrun-playwright-e2e-tests. The branch bound it to thetestphase with${skipTests}, whichfrontend.yml's-DskipTestsbuild skips.index.html.receiveEnvelope, added toMessageServiceby ZEPPELIN-6683. Without it, the workspace route did not render.getCurrentThemeandtheme$. Without them,ThemeToggleComponentthrows inngOnInit. The original test did not catch this, because Angular'sErrorHandlerreports it throughconsole.error('ERROR', ...)and never as apageerror. The test now fails on those errors too. Removing the theme fix makes it fail withthis.themeService.getCurrentTheme is not a function.getSnapshotandsubscribe, and the port is frozen;bootstrap,connectorclosecall.e2e/core-contract/README.mdinstead of splitting the replay subsections. It describes the actual CI wiring and notes that ZEPPELIN-6683's stale-reply rejection lives insideNotebookComponentand is not moved into the Core.notebook-route-boundary.ts). Production code changes are limited to extracting the existing route paths into those constants, which both the routing modules and the proof use../NotebookRouteBoundaryProbewebpack alias (it re-exposed the same module), and unused route-proofproofsstate.What type of PR is it?
Improvement
Todos
What is the Jira issue?
ZEPPELIN-6675
How should this be tested?
cd zeppelin-web-angular npm run build:projects npm run build:notebook-core-port-proof npm run test:notebook-core-port-identity npm run test:notebook-route-boundaryWhat I ran locally (after rebasing onto
6a5ed4459):test:notebook-core,typecheck:notebook-corecheck:core-contract-fixtures,test:shell./mvnw verify -pl zeppelin-web-angular -Pweb-e2e(before the rebase): the proof build, the port identity proof and the route proof passed inintegration-test.paragraph-functionality.spec.ts:174and:335, on all three browsers;%python, and every failure context showsFail to launch python processfrom my local Python setup;CI=true, so the HTML reporter waited for input. This PR does not touchzeppelin-web.mathjaxtypes: without them, theMathJaxdirective fails to compile;.lessimports fail to resolve.Screenshots (if appropriate)
N/A.
Questions:
e2e/core-contract/README.mdis updated.Unrelated, found while testing: production
main.jsbuilds the Monacocodicon.ttfURL from the build machine's absolutefile:///path, so the browser refuses to load that font. It also happens onmaster.🤖 Generated with Claude Code