Repository navigation
Initialize SQLPage fragments incrementally and only once - #1534
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 03c4623fad
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5bd9e21d9d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d53afaa1d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 26761753d1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b46038795b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (document.readyState === "loading") { | ||
| document.addEventListener("DOMContentLoaded", initialize, { once: true }); | ||
| } else { | ||
| setTimeout(initialize, 0); |
There was a problem hiding this comment.
Initialize components before DOMContentLoaded callbacks run
On normal pages sqlpage.js is deferred, so it executes while document.readyState is already interactive; this branch postpones every initializer to a timer, which runs after DOMContentLoaded. Custom javascript scripts included by shell.handlebars are also deferred and can therefore receive DOMContentLoaded while forms, tables, Bootstrap widgets, and lazy bundles are still uninitialized. Previously SQLPage registered its DOMContentLoaded listeners before those custom scripts, so integrations that access initialized components from that event now race or fail; retain a one-shot initialization during DOMContentLoaded rather than deferring it past the event.
Useful? React with 👍 / 👎.
Loading card fragments repeatedly attached change handlers to every existing form and file input, so a single field change could submit the form multiple times. Initializers now receive the fragment root and include that element when selecting components. WeakSets retain one form/file handler per element, and Bootstrap initialization reuses existing widget instances.
Chart, searchable-select, table, card, map, toast, modal, and script initialization share the same lifecycle. Lazy chart, searchable-select, and map dependencies retain only the announced component roots while loading. Relocated modals announce their subtree so later initializers still reach nested widgets. The existing card documentation describes the fragment event contract, and the unreleased changelog records the listener fix.
Regression coverage reuses existing SQL fixtures and component tests through the shared
loadFragmentbrowser harness. The existing toast, modal, filtering, header-sort, reverse-sort, and formatted-number-sort assertions run for both initial pages and fragments. Official-site smoke tests retain their original documentation URLs; independent toast/table/modal fixture suites load real SQL output with the shared harness. One assertion module serves both suites without duplicating bodies, and fixture SQL contains only the tested example data (no official-site database dependency):Validation:
npm run format,npm test, andnpm run buildpassed. The built SQLPage server passed the complete Playwright suite: 109 tests.CI limitation: Oracle CI on the prior frontend head passed all 89 integration assertions but hung during process shutdown. The native driver cleanup hang (
finiSqora -> bccFreeProcess) also occurs on unchanged base main commit c12c154 (baseline Oracle job). It was independently reproduced locally on query PR #1533 after all 89 assertions passed. Serial test execution still hangs; no success override, test skip, or timeout relaxation was added. The latest frontend CI run remains in progress.