Skip to content

refactor(planning): simplify range 1 of app.js without behavior change - #14775

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-14684-42645229846-1
Nov 9, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-14684-42645229846-1

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14684

Summary

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

Simplified the first fifth (original lines 1-1627) of plugins/planning/shared/web/app.js through /simplify's four checks, with the DOM, handlers and outputs unchanged. Reuse: askBtn and citeBtn now use the existing lbtn helper, which builds the same button, icon and label span. Simplification: the duplicated Answer-first check in claudeHidden and resultsWait is now one answerFirst() helper, the Host view's two identical counted-chip loops share countChips(), the three Proposed filter handlers are one loop, the always-false || !v8() term and the unused myReqs/resList aliases are gone, and two stray doc comments now sit on the functions they describe. Choice of means: I kept v8 itself and every caller outside range 1, since the issue limits edits to functions that start in range 1.

Not verified

  • JS syntax check, the Python unit tests (test_page_chrome.py, test_session.py) and the browser UI tests (ui_*.js, *.test.sh) were not run here: this lane runs no interpreter or test runner. Left to the PR's CI.
  • ci-status green is a PR CI check, left to the PR's CI
  • tidy recorded as skipped: passes 1-4 ran and made no edits, and pass 5 (ai-slop fix on the fragment) was a rubric read only, because detect.sh is not a wrapper this lane may run

Fix

  • plugins/planning/shared/web/app.js: in range 1 only: moved the zoomTag and passes doc comments onto their functions; paintPersonActs reuses the Remove/Restore text for its aria-label; paintPropActs drops the always-false !v8(); new answerFirst() replaces the duplicated pref check in claudeHidden…
  • .changes/planning/work-resolve-issue-issue-14684-42645229846-1-d8b46274.md: patch fragment, ### Changed, Internal simplification, no behavior change.

Verification

The runner ran each check from the base copy against 93a1e6b:

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

The run reports:

  • check-changelog-fragments: all 2 fragments valid (run before and after tidy)
  • check-changed-skills: no changed skills, nothing to gate (run before and after tidy)
  • check-affected: 12 passed, 7 skipped, rest CI-only (run before and after tidy)
  • fresh-context review subagent over the whole diff: NO FINDINGS. It checked DOM equivalence per hunk, TDZ and closure capture, later readers such as citeBtn.lastChild at line 6260 and the Object.entries order of qfBtns/pfBtns, that every hunk sits in original lines 1-1627, the source-string asserts…
  • grep: myReqs/resList had no references besides their definition; countChips, answerFirst and qPicHead are new names that collide with nothing
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42645229846

Left out: the items under Not verified.

Related

#14684

Merge-Risk: max=MEDIUM demote=false head=e279db31029045fd050a06c63836ffa96a23e1d4 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 needs no new review of e279db31029045fd050a06c63836ffa96a23e1d4: no file of this pull request changed since the review of 93a1e6b.

Security review: PR #14775

I read every hunk of both changed files:

  • plugins/planning/shared/web/app.js
  • .changes/planning/work-resolve-issue-issue-14684-42645229846-1-d8b46274.md

Neither file matches a trusted-path glob. The diff changes no trust control, plugin manifest, workflow or standing instruction.

No security issues found.

The change is a client-side refactor of DOM-building code:

  • askBtn and citeBtn now use the existing lbtn helper.
  • A new countChips() helper builds the Host view's filter chips.
  • A new answerFirst() helper holds the Answer-first check that was duplicated in claudeHidden and resultsWait.
  • The three Proposed filter handlers become one loop.
  • Unused aliases are removed and two doc comments are moved onto the functions they describe.

I checked the parts of the refactor that could have opened a security path:

  • No new HTML sink. Labels still go in through E(..., text) and textContent. Nothing adds innerHTML or an HTML-string sink.
  • Remove/Restore label. k.remove's aria-label now reads k.remove.textContent, which the line before sets to one of two fixed strings. The visible output is the same.
  • Who sees others' picks. The answerFirst() helper computes exactly what the inline pref/want code it replaces did. resultsWait still returns early for the owner, a locked question and a poll, and still checks Core.canModerate(), so who sees other guests' picks is unchanged.
  • paintPropActs. Dropping || !v8() only affects whether the "Later" button is hidden. The PR says that term was always false; I did not check that, but it is a display question, not a security one.

The changelog fragment is plain text that runs no code.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

claude-review needs no new review of e279db31029045fd050a06c63836ffa96a23e1d4: no file of this pull request changed since the review of 93a1e6b.

Code review: no findings

I read every hunk in both changed files: plugins/planning/shared/web/app.js and the new changelog fragment .changes/planning/work-resolve-issue-issue-14684-42645229846-1-d8b46274.md.

Equivalence checks (each one confirmed against the head file)

  • Dropping || !v8() changes nothing. v8 is () => true (app.js#L56), so !v8() was always false.
  • askBtn and citeBtn build the same DOM. lbtn (#L196) does exactly what the old inline code did: btn(cls), then icon(name), then E("span", null, text). The label span is still lastChild, which citeBtn.lastChild.textContent at #L6260 depends on.
  • answerFirst() matches the old want expression exactly. It now runs on every call, but that is safe:
    • Every caller of claudeHidden and resultsWait sits at line 2671 or later, well past the const declarations, so the temporal dead zone (TDZ) cannot be hit.
    • claudePref is declared at #L125.
  • countChips keeps behavior. Chips are inserted in the same order, the click handler still writes ui[field], and the returned map has the same keys in the same order as qfBtns and pfBtns.
  • The propFilter loop works. Each iteration gets its own binding of f, so every handler captures the right filter.
  • qPicHead builds the same structure. The order is unchanged.
  • The k.remove aria-label is unchanged. textContent is set on the line just before it, so the label reads the same text.
  • Removed aliases had no readers. myReqs and resList appear nowhere else in plugins/planning. No test there asserts on any source string this PR changes.

Closing issue #14684

  • Behavior unchanged: met. Every hunk above is equivalent. The UI and Python suites were not run here; the PR says CI runs them (author's claim, not checked).
  • Only the listed file and a fragment are edited: met.
  • Within 400 changed lines: met.
  • Fragment: met. It is bump: patch, its section is ### Changed, and its body is the required line.
  • Range 1 only: met. Every hunk falls within base lines 194–1574, inside the stated range of 1–1627.
  • ci-status green: CI's job; not checked here.

No .claude/rules path glob matches either changed file. No plugin manifest changed. Neither file matches a trusted-path glob. No embedded instructions found in the PR context.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for e279db3

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-14775-e279db31029045fd050a06c63836ffa96a23e1d4, 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 9431f2e Nov 9, 2026
73 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14684-42645229846-1 branch November 9, 2026 19:26
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 9431f2e84503c8f9118d2023930797b9e2dac1a6; later checks count it verified from this comment.

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 app.js planning plugin code (part 1 of 5)

1 participant