Skip to content

feat: vendor xterm.js — fully offline, no CDN (v0.2.0)#2

Merged
mabry1985 merged 1 commit into
mainfrom
feat/vendor-xterm-offline
Jun 13, 2026
Merged

feat: vendor xterm.js — fully offline, no CDN (v0.2.0)#2
mabry1985 merged 1 commit into
mainfrom
feat/vendor-xterm-offline

Conversation

@mabry1985

Copy link
Copy Markdown
Contributor

Follow-up A (offline). xterm.js + the fit/web-links addons + xterm.css are now vendored under vendor/ and served by the plugin at /plugins/terminal/static/{name} (whitelisted FileResponse, no traversal). The view loads them BASE-prefixed via injected <script>/<link> and reads the UMD globals (window.Terminal, window.FitAddon.FitAddon, …) — no jsDelivr. capabilities.network is now []; the terminal works airgapped/offline.

Tests: the static route serves the vendored files (+404 for non-whitelisted); the view page references the local /static path and contains no CDN/https:// URL. 17 tests green.

xterm.js + the fit/web-links addons + xterm.css are now vendored under vendor/ and
served by the plugin at /plugins/terminal/static/{name} (whitelisted FileResponse,
no traversal). The view loads them BASE-prefixed via injected <script>/<link> and
reads the UMD globals (window.Terminal, window.FitAddon.FitAddon, …) — no jsDelivr.
capabilities.network is now [] — the terminal works airgapped/offline.

Tests: the static route serves the vendored files (+404 for non-whitelisted); the
view page references the local /static path and contains no CDN/https URL.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@protoquinn

protoquinn Bot commented Jun 13, 2026

Copy link
Copy Markdown

👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow.

@protoquinn protoquinn Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA Audit — PR #2 | feat: vendor xterm.js — fully offline, no CDN (v0.2.0)

VERDICT: WARN (non-terminal CI — test queued; re-review on CI completion)


CI Status

  • test: ⏳ queued

Diff Review

  • Vendors xterm.js + fit/web-links addons + xterm.css under vendor/, served via new /static/{name} route with a strict whitelist (_VENDOR_TYPES dict). No path traversal possible — name is gated by dict membership before any filesystem access.
  • Version bumped 0.1.1 → 0.2.0 in both pyproject.toml and protoagent.plugin.yaml (a test enforces lockstep).
  • capabilities.network flipped from ["cdn.jsdelivr.net"] to [] — clean.

Observations

  • GAP: Diff truncated at 471 lines — the view template (PAGE) changes and vendor/xterm.js are not visible in this review pass. Tests assert the PAGE references /plugins/terminal/static/ and contains no CDN/https:// URLs, which mitigates but doesn't eliminate the gap.
  • LOW: clawpatch structural review unavailable (repo not in project registry). Diff-based review only.
  • SEC/LOW: The /static/{name} whitelist is sound. _VENDOR_TYPES.get(name) returns None for any non-whitelisted name, including traversal attempts like ../../../etc/passwd, blocking them before Path resolution. ✅

— Quinn, QA Engineer

@protoquinn

protoquinn Bot commented Jun 13, 2026

Copy link
Copy Markdown

Submitted COMMENT review on #2.

@mabry1985 mabry1985 merged commit ab9ca24 into main Jun 13, 2026
1 check passed
@mabry1985 mabry1985 deleted the feat/vendor-xterm-offline branch June 13, 2026 18:37
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.

1 participant