← Back to Pull requests

Let the board run in a sandboxed frame #70

Closed
unknown closed this pull request without merging on Nov 20, 2026 15:01 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 02:58 UTC
Author

Makes the board work in a sandboxed frame (no allow-same-origin, no allow-modals), like the one Hermes Desktop gives plugin pages. Two changes, one commit each, plus a fix from review; nothing changes in a normal tab. Discussed in #67.

  • Ask in the page instead of confirm(). In such a frame the native confirm() answers Cancel without asking, so deleting a task, a comment or a project, and the sync and update questions, can't be answered. ask(message) shows the same question in a dialog styled like the new-project one and resolves to true or false; its ten callers await it. Escape, a click outside and a newer question answer Cancel. One new string, OK, is in zh-cn.js.

  • Take the board's host from the base URL. The share menu read location.hostname, which is empty in a frame loaded from a data: URL and can't be redefined, so the board thought it was opened from another computer. new URL(document.baseURI).hostname is the same value in a normal tab.
  • Tried:

  • In a normal tab, light and dark: the dialog, Cancel, Escape, OK, and the share menu's title.

  • In the Electron build Hermes Desktop ships, with the board in the plugin's sandboxed frame and no rewriting of app.js: every former confirm() path (delete task, comment, selected tasks, project; both sync questions; update), Cancel/Escape/Enter, the share menu's host; no console errors. Then in Hermes Desktop itself.

  • The same frame with today's 0.4.2 fails as expected: Chromium logs "Ignored call to 'confirm()'. The document is sandboxed".
  • cargo fmt --check, cargo clippy --all-targets -- -D warnings and cargo test pass

  • A board change was tried in a browser, in light and dark mode

  • The README says what changed for users, if anything did (nothing to add: the dialog asks the same questions)
  • Diff: 228 lines (+171 / -57) across 2 files Reviewer: emanuele-em Review duration: 3602m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.37) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 228 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.325
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #70"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 37.0% (MEDIUM) · Higher = larger blast radius
    37.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.0% · Safe to merge
    16.0%