Skip to content

🚀 Variables editor redesign, streaming proxy fix, security & license updates - #243

Merged
sergak01 merged 15 commits into
mainfrom
develop
Aug 19, 2026
Merged

🚀 Variables editor redesign, streaming proxy fix, security & license updates#243
sergak01 merged 15 commits into
mainfrom
develop

Conversation

@sergak01

Copy link
Copy Markdown
Contributor

Summary

  • 🚀 PP-4021: redesigned Variables Editor schema/values UX
  • 🔐 Fixed both high-severity npm audit findings (deepmerge-ts bump, extract-zip symlink mitigation)
  • 🧹 Added MIT LICENSE and set package.json license to MIT (PP-4041)
  • 🔧 Fixed CI's audit gate so a documented, unfixable-upstream advisory no longer blocks every build
  • 🔧 Fixed two latent bugs in the Variables Editor that CI had never actually caught (masked by the audit gate failing before test could run): unguarded Element.scrollTo/requestAnimationFrame calls, and stale test selectors from the pre-redesign markup
  • 🔧 Implemented the streaming proxy interceptor (text/event-stream and chunked responses now get the same host rewriting and status-code forwarding as every other proxied response)

Included commits

  • feat(ui): improve variables editor schema/values UX
  • PP-4021 [Internal] PP Dev helper variables editor UI (PP-4021 #239)
  • fix(security): reject unvalidated symlinks after zip extraction
  • chore(deps): fix npm audit vulnerabilities
  • chore(deps): fix audit vulnerabilities in test fixtures
  • chore(license): add MIT license (PP-4041)
  • fix(ci): allowlist extract-zip's unfixable advisory in audit-all
  • fix(variables-editor): guard missing browser APIs, update stale test selectors (🔐 Fix npm audit vulnerabilities and add MIT license #242)
  • fix(proxy): rewrite URLs and forward status for streamed responses
  • fix(proxy): rewrite JSON and XML streams, and respect client backpressure (fix(proxy): rewrite URLs and forward status for streamed responses #238)

Testing

  • ✅ CI green on develop (build + test) after all of the above merged
  • npm run audit:all, npm run test:unit, npm run test:integration all clean

Merge Request: origin/developorigin/main

eastagiletracker and others added 13 commits August 13, 2026 12:06
streamResponseInterceptor() took an interceptor and then piped the upstream
response straight to the client without ever calling it, so the host rewriting
every other proxied response gets was silently skipped for text/event-stream
bodies (and for chunked responses sent with x-accel-buffering: no). The upstream
status code was dropped the same way, so a streamed 503 reached the browser
as 200.

Implement the interceptor: complete lines are forwarded as they arrive, so an
SSE event is never delayed, while a trailing partial line is held back so a
replaced value split across two chunks is still matched. Decoding runs through
StringDecoder so a multi-byte character split across chunks stays intact, and
the pending buffer is flushed once it reaches 64 KiB so a stream without line
breaks neither stalls nor grows without bound.

Rewriting is limited to payloads that can be decoded as text: compressed bodies
(content-encoding) and non-textual content types are piped through byte for
byte as before. content-length is dropped only when the body is rewritten.
…sure

Two gaps in the streaming interceptor:

The textual check tested the raw content-type against a pattern that only
accepted json or xml at the start of the value or after a "+", so the
standard application/json and application/xml types fell through to the
pass-through path and kept their upstream host. Parse the media type off
the parameters and match it whole.

Writing the rewritten chunks by hand also dropped the backpressure that
pipe() used to apply: res.write() returning false was ignored while the
data listener kept the upstream flowing, so a slow client grew the response
write queue without bound. Pause the upstream until the response drains.
- add visual list additional_options column editor with DnD reorder
- allow drag-and-drop reorder of schema variable rows
- redesign values tab as nav + scrollable detail with scroll spy
- style list value items as cards with DnD reorder
- show JSON diff confirmation modal before save
- polish inputs (30px auto-grow), thead radius, and related UI
- update commonjs test fixture template variables for list editing
- add visual list additional_options column editor with DnD reorder
- allow drag-and-drop reorder of schema variable rows
- redesign values tab as nav + scrollable detail with scroll spy
- style list value items as cards with DnD reorder
- show JSON diff confirmation modal before save
- polish inputs (30px auto-grow), thead radius, and related UI
- update commonjs test fixture template variables for list editing
extract-zip has an unpatched symlink path-traversal vulnerability
(GHSA-jmr9-qjv8-65gv, no fixed release exists). It creates symlinks
from zip entries without validating their target, so a malicious
backup/asset archive could plant a symlink pointing outside the
extraction directory. Reject any symlink found in the extracted tree
before dist.service.ts and changelog-generator.ts read/write through it.
mi-examples repos are required to be MIT licensed. Add a LICENSE file
and switch package.json's license field from ISC to MIT to match.
npm audit has no fix for extract-zip's symlink advisory (GHSA-jmr9-qjv8-65gv,
already mitigated in application code), so audit-all always exited 1 and
failed the CI build job regardless of the code-level mitigation. Rewrite
audit-all.mjs to evaluate `npm audit --json` against a small, documented
allowlist of GHSA ids instead of trusting npm's raw exit code, so a known,
unfixable, mitigated advisory no longer blocks CI while any other high or
critical vulnerability still fails the build.
…selectors

CI never ran the unit test suite because it always failed earlier at the
`build` job's npm audit step — so these bugs from the PP-4021 values-editor
redesign went unnoticed until the audit-all fix let `test` actually run:

- scrollToValueRow() called detail.scrollTo() unconditionally; jsdom (and
  potentially older WebViews) don't implement Element.prototype.scrollTo.
  Guard it like the existing null checks, degrading to no auto-scroll.
- showJsonDiffModal() called requestAnimationFrame() unconditionally before
  wiring the modal's Save/Cancel button handlers; jsdom doesn't implement it
  either, so the whole confirm-save flow threw before those listeners were
  ever attached. Guard it the same way.
- Two tests still queried '#content tbody input', a selector from the old
  table-based values tab; the redesign moved to '.ve-values-detail'. Updated
  both to the current markup.
- save() now opens a confirmation diff modal instead of saving immediately;
  updated the pending-save test to click '.ve-modal-ok' before asserting the
  save request fired.
🔐 Fix npm audit vulnerabilities and add MIT license
…onse-rewrite

fix(proxy): rewrite URLs and forward status for streamed responses
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d92f88ce-db31-4c5d-a1b1-c605d33f427b


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The workflow_run trigger set the job's GITHUB_REF to the workflow file's
ref (main, the repo's default branch) instead of the branch that actually
triggered it (develop), even though the checkout step explicitly checks
out develop's commit. semantic-release's branch detection (env-ci) reads
only GITHUB_REF, so it decided it was releasing from main, computed a
stable 1.3.0 instead of a beta prerelease, and tried to push straight to
main — which branch protection correctly rejected (GH006).

This job's `if:` guard already restricts it to develop in both trigger
paths, so hardcoding GITHUB_REF here is always correct.
…ction

🔧 Fix beta-release pushing to main instead of develop
@sergak01
sergak01 merged commit d2851d3 into main Aug 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants