Skip to content

refactor(planning): simplify the prototype page and container-label script - #14779

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14690-42645261551-1
Nov 9, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14690-42645261551-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #14690

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Simplified proto.js and container-label.sh with no behavior change. In proto.js: one hashParams() helper replaces four copies of the same URLSearchParams expression; sandboxFrame() and newTabLink() replace two copies each of the sandboxed-iframe and new-tab-link setup; vcaption() replaces two copies of the version caption; hasView/liveOnly call Core.viewsOf once instead of up to three times; a duplicate doc comment and a redundant guard are gone. In container-label.sh, a default_label() function replaces three copies of the print-default-and-exit block. question-shape.js and setup-apply.mjs are unchanged because no simplification within the out-of-scope limits made them clearer (setup-apply.mjs is already one run() call). web-vitals.attribution.iife.js is unchanged on purpose: it is vendored and unedited, and test_server.py pins its sha256.

Not verified

  • web-vitals.attribution.iife.js left unedited: it is a vendored third-party build that test_server.py pins by sha256 and server.py marks 'vendored, unedited'
  • question-shape.js and setup-apply.mjs not changed: no clear behavior-preserving simplification found within the issue's scope
  • Test suites not run here (this lane allows no interpreter): plugins/planning/skills/wayfind/scripts/container-label.test.sh, plugins/planning/shared/tests/test_page_chrome.py, test_server.py and the Playwright suite ui_proto.js; left to the PR's CI
  • ci-status green is left to the PR's CI
  • tidy skipped its markdown passes (write-for-humans, ai-slop fix): the only markdown is the changelog fragment, whose one line the issue requires word for word

Fix

  • plugins/planning/shared/web/proto.js: added the hashParams, sandboxFrame, newTabLink and vcaption helpers in place of repeated code; hasView/liveOnly read Core.viewsOf once; dropped a stale duplicate JSDoc on pinsFor, the redundant if (ui.variant !== v.id) guard, and the duplicated title string
  • plugins/planning/skills/wayfind/scripts/container-label.sh: added default_label() in place of three copies of the printf-and-exit-0 block
  • .changes/planning/work-resolve-issue-issue-14690-42645261551-1-2a289f0b.md: new planning patch fragment, ### Changed with "Internal simplification, no behavior change."

Verification

The runner ran each check from the base copy against 00a5179:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: all 1 fragment valid
  • check-changed-skills: wayfind PASS, 0 errors, 4 warnings that predate this change (description length, body length, no Gotchas)
  • check-affected (run before and after tidy): 13 passed, 6 skipped, no failures
  • fresh-context review subagent compared every changed region against the old code (DOM attribute order, chained assignment, shadowing, bash exit paths, --help header): no behavior differences found
  • tidy-diff over the changed lines: no edits; one proposal (inline the one-line views wrapper in proto.js, left because its callers sit outside the changed lines)
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42645261551

Left out: the items under Not verified.

Related

#14690

Merge-Risk: max=LOW demote=false head=00a51791c0844089d5436d8d71074adc2f87d784 rubric=8.1.6 rater=claude-opus-5-5 checker=claude-opus-5-5

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 00a51791c0844089d5436d8d71074adc2f87d784: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #14779 (head 00a5179)

I found no security issues. I read every hunk of all three changed files. None of them matches a trusted-path glob, and the diff touches no trust control, plugin manifest or standing instruction.

What I checked

  • plugins/planning/shared/web/proto.js, sandboxFrame(): both callers (the main snapshot frame and the compare frame) still get exactly sandbox="allow-scripts" and referrerpolicy="no-referrer", and never allow-same-origin. The attributes are set when the element is created, before the callers attach the load handler and set the source, as they were before. The sandbox did not get weaker. The "a second load replaces the frame" guard is unchanged at both call sites.
  • proto.js, newTabLink(): both links keep target="_blank", rel="noopener noreferrer" and referrerPolicy="no-referrer". The "Look at it on this machine" link is still built only after the unchanged ^http://127\.0\.0\.1:[0-9]{1,5}$ check on e.url.
  • proto.js, the other helpers: hashParams(), vcaption(), the single-call hasView/liveOnly and the chained document.title = title.textContent = ... assignment only reorganise existing code. The title is still written through textContent and nothing new reaches innerHTML. Setting ui.variant = v.id without the old guard changes nothing.
  • plugins/planning/skills/wayfind/scripts/container-label.sh: default_label() runs in the main shell, not a subshell, so its exit 0 still ends the script at all three former early-exit points. The [[ ... ]] || default_label guards are the exact opposites of the old if conditions, and the resolver exit-code handling (including the 3) error path) is unchanged. No new command or variable is interpolated, and no quoting changed.
  • .changes/planning/...md: a changelog fragment with no executable content.

The PR context contains no embedded instructions directed at the review.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 00a51791c0844089d5436d8d71074adc2f87d784: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

I read every hunk of all 3 changed files. I found no correctness or maintainability problems.

plugins/planning/shared/web/proto.js

  • New helpers. hashParams, sandboxFrame, newTabLink and vcaption each do exactly what the copies they replace did:
    • the frames still get the same sandbox="allow-scripts", referrerpolicy and title;
    • the links still get the same target, rel and referrerPolicy.
  • No load-order risk. The new const helpers are only used inside functions that run after the module has finished loading. render is first registered at Core.subscribe(render) on the file's last lines (L542), so no helper can be called before it exists.
  • Smaller edits.
    • document.title = title.textContent = … is a chained assignment, and it still sets both to the same string.
    • Setting ui.variant = v.id without the old if guard behaves the same, because ui is a plain object.
    • hasView and liveOnly now call Core.viewsOf once and give the same results.
    • Removing the duplicate JSDoc changes nothing at runtime.

plugins/planning/skills/wayfind/scripts/container-label.sh

  • default_label(). It is defined after DEFAULT_LABEL and keeps the same stdout and exit 0 on all three paths. set -e is not on, so the [[ … ]] || default_label form changes no exit behaviour.
  • --help output. The awk header range (line 2 up to set -uo) is untouched, so --help prints the same text.

Closing issue #14690, acceptance criteria

  • Unchanged behaviour: met, from reading the code.
  • Only listed files plus a fragment are edited: met.
  • Under 400 lines and 15 files: met.
  • The planning patch fragment has ### Changed and the required line: met.
  • ci-status green: this lane can't check it, and the PR leaves it to CI.

The author says they did not run the test suites (container-label.test.sh, ui_proto.js, test_page_chrome.py, test_server.py). I did not run them either; that is left to the PR's CI. I also did not confirm the author's reported runs of check-changelog-fragments and check-changed-skills.

No plugin manifest is changed. I found no embedded instructions in the PR context.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 00a51791c0844089d5436d8d71074adc2f87d784, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 00a5179

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-14779-00a51791c0844089d5436d8d71074adc2f87d784, expires on 2026-12-09.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit 93c21ad Nov 9, 2026
77 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14690-42645261551-1 branch November 9, 2026 20:57
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.

Simplify the web, setup and wayfind planning plugin code

0 participants