Conversation
Adds PageVariableAPI and live page-variable read/write on MiAPI, plus the schema/export/validation helpers that the Variables Editor and dev-panel "Reload variables" feature build on.
New /@pp-dev/variables-editor page (Schema + Values tabs), alongside the existing Request Inspector, plus "Reload variables" and "Open variables editor…" buttons in the dev panel's settings popover. Extends the test-commonjs fixture's __template_variables.json to cover every tag_type for manual/e2e testing.
Documents the new Variables Editor and dev-panel buttons in the README, and fixes two stale references: templateLess described as a current public config key (it's 0.x-only, migrated to app.type), and TEMPLATE_VARIABLES.md describing the removed Setup/Export dev-panel flow instead of the Values tab's actual JSON mode.
…, Inspector, and Variables Editor Adds light-theme support to the previously dark-only Request Inspector and Variables Editor, an Auto/Dark/Light switcher for both, then moves the switcher into the dev panel's settings popover as the primary control. All three surfaces share one localStorage key (pp-dev-info-theme) and DOM attribute (data-pp-dev-theme), so a choice made in any of them applies to the others too. Also removes docs/ files planning the (now shipped) 1.0 config rework — no longer needed.
Adds docs/features.md with real screenshots of the dev panel, Request Inspector, and Variables Editor, and links it from the README. Also embeds a few of the same screenshots directly into the relevant README sections and documents the new panel-hosted theme switcher.
… resolves Switching tabs now repaints immediately with whatever's already cached for the target tab, or a skeleton if it's never been loaded, instead of leaving the previous tab's content on screen until the network round-trip completes. The round-trip itself is now debounced (200ms) since it's automatic — the existing manual "Refresh" button stays undebounced for when an immediate reload is actually wanted. A small "Refreshing…" indicator in the toolbar covers the case where cached content is showing while a background reload is in flight.
…ore delete The gear icon that opened a schema row's advanced fields (uid, tag_source, additional_options, editor flags) sat in the far-right actions column, forcing a mouse trip across the whole row for every variable. It's now a chevron at the start of the row, right next to Name, so scanning down a column of rows to check/expand several of them no longer means reaching all the way over each time. Also: deleting a schema or values row no longer happens on a single click — both now go through the existing confirm-modal pattern first.
Picks up all of the above in the built package.
Bumps brace-expansion/ip-address/undici overrides past newly-disclosed vulnerable ranges (root + all 3 fixtures), and adds a js-yaml override in the Next.js fixtures for a CVE published mid-session. Also extends patch-npm-bundled-vulnerabilities.mjs to cover undici (it already patched brace-expansion/ip-address/tar) and to sync the patched versions into package-lock.json — the script only ever rewrote files on disk, so npm audit kept flagging the stale versions it still had recorded in the lockfile. npm audit is clean (0 vulnerabilities) in root and all 3 test fixtures.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Summary
/@pp-dev/variables-editor) for editing a template's variable schema and a page's live variable values, alongside the existing Request Inspector — plus new "Reload variables" / "Open variables editor…" buttons in the dev panel.localStorage) with the standalone Inspector and Variables Editor pages.npm auditfindings in root and all 3 test fixtures — 0 vulnerabilities across the board.docs/features.md), linked from the README.Key changes
Variables Editor
src/lib/variables-editor.ts— new standalone page: Schema tab (edit__template_variables.json) and Values tab (edit live page-variable values), each with a raw-JSON escape hatch.src/lib/page-variables-diff.ts,src/api/page-variable.ts,src/lib/pp.middleware.ts— schema/export/validation helpers andPageVariableAPIbacking the editor and the dev-panel "Reload variables" action.Theme switcher
src/client/theme.ts(new) — sharedgetStoredTheme/setTheme/initTheme, using onelocalStoragekey (pp-dev-info-theme) and one DOM attribute (data-pp-dev-theme) across the dev panel, Inspector, and Variables Editor.Variables Editor UX fixes
uid,tag_source,additional_options, editor flags) now expand via a chevron at the start of each row instead of a gear icon at the far right end.Security
brace-expansion/ip-address/undicioverrides past newly-disclosed vulnerable ranges (root + all 3 fixtures), added ajs-yamloverride in the Next.js fixtures for a CVE published mid-session.scripts/patch-npm-bundled-vulnerabilities.mjsto also coverundici(it already patchedbrace-expansion/ip-address/tarbundled inside thenpmpackage viasemantic-release), and to sync the patched versions intopackage-lock.json— the script only ever rewrote files on disk, sonpm auditkept flagging the stale versions it still had recorded in the lockfile.Included commits
Testing
npx tsc --noEmit— cleannpm run test:unit— 274/274 passingnpm run test:integration— 39/39 passingnpm run audit:all— 0 vulnerabilities in root + all 3 test fixturesMerge Request:
origin/pp-3990→origin/develop