Skip to content

feat(planning): owner-only Host Health panel on the shared interview page - #10127

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-9974-40232598751-1
Oct 26, 2026
Merged

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

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #9974

Summary

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

The shared interview page now has a Host Health panel that only the owner sees, listed in Help and More. It shows the same summary share.sh logs --summary prints for the whole kept server log, section by section, and reads it from a new owner-only GET /api/owner/health. share.py's summary text is now built from one summary_sections function, so the CLI text and the panel cannot drift apart.

Not verified

  • The Python unit tests (tests/test_server.py TestHostHealth, tests/test_share.py) and the browser suite (tests/ui_telemetry.js) were written but not run: this lane allows no interpreter or node runs. They are left to the PR's test lanes.
  • The new Host Health panel has not been seen in a real browser, on a phone or on a computer; its layout was checked only by reading the code.
  • scripts/new-changelog-fragment refused to run on the detached HEAD (exit 2), so the fragment was written by hand in its documented format; check-changelog-fragments validates it.
  • Untracked files at the repository root (.bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc) were already there and are not part of this change. Keep them out of the patch.

Fix

  • plugins/planning/shared/share.py: log_lines(d) factored out of cmd_logs; new summary_sections(s) returns [{title, lines}], and summary_text joins them. The output is unchanged except that the final 'Repeats whose first entry...' line now follows a blank line.
  • plugins/planning/shared/server.py: imports share.py as share_cli; new owner-only route HEALTH = /api/owner/health in do_GET (authorize("owner")); App.health() returns {summary, sections}.
  • plugins/planning/shared/web/core.js: Core.health() fetches /api/owner/health.
  • plugins/planning/shared/web/app.js: Host Health menu entry in Help and More, shown only to the owner; the panel has Refresh and a status line, renders sections as headed lists through textContent, is placed again once loaded, and is a bottom sheet on a phone; it gets the shared close x.
  • plugins/planning/shared/web/app.css: panel and list styles; the phone bottom-sheet rule now covers .vf-healthpop.
  • plugins/planning/shared/README.md: GET /api/owner/health row in the owner-only routes table, and a Host Health paragraph under Logs.
  • plugins/planning/shared/tests/test_server.py: TestHostHealth checks that the owner gets what logs --summary --json prints, plus sections, and that no identity, a guest or a leader gets 403 owner-only.
  • plugins/planning/shared/tests/test_share.py: a test that the section titles, the 'none' lines and the plain-text layout match.
  • plugins/planning/shared/tests/ui_telemetry.js: the owner opens Host Health and sees the thrown error under Top errors, with sections through Dead taps; a guest's Help and More have no Host Health entry.
  • .changes/planning/feat-9974-host-health-panel-4d7e2a91.md: new minor changelog fragment, written by hand because new-changelog-fragment refuses a detached HEAD.

Verification

The runner ran each check from the base copy against c693d09:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • read https: //github.com/melodic-software/claude-code-plugins/issues /8614 (WebFetch): the parent issue says only 'an owner-only view of the summary on the page' and names no fields or placement; the owner released it for re-triage on Oct 25 and recorded no hold. The summary is therefore read as `sh
  • .lane/checks/bin/check-changelog-fragments: All 6 changelog fragment(s) under .changes/ are valid (run before and after the review fixes).
  • .lane/checks/bin/check-affected: 10 passed, 6 skipped over 10 changed files (skips: shellcheck had no shell files, typos is not installed, no skill files changed, and three validate-plugins steps run code from the checked tree); run before and after the review fixes.
  • Fresh-context review subagent over the whole diff: one likely bug (the panel was placed while empty and then grew over the phone tab bar), fixed by placing it again once loaded and making it a phone bottom sheet. Two small fixes were also applied: the README refusal wording, and importing share as s
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40232598751

Left out: the items under Not verified.

Related

#9974

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

Copy link
Copy Markdown
Contributor

claude-security-review reviewed c693d09b6181e9def82f02f0341f0ceab77374d0: 0 finding(s), 0 as inline comments.

No security issues found in this pull request (head c693d09).

critical-findings: 0

What I checked:

  • New route GET /api/owner/health. The route calls self.authorize("owner") before it reads anything (plugins/planning/shared/server.py, do_GET).
    • authorize answers 403 owner-only when X-Owner-Token is absent. Otherwise it goes through self.identity(), so a stale or foreign token gets the same 401 as any other owner route.
    • The route is not in GET_ROUTES or in the watcher-key allowlist, so a guest's or watcher's credential does not reach it.
    • The handler takes no input. It reads only self.app.dir through share_cli.log_lines, so there is no path, injection or traversal surface.
  • Data exposed. The response is the same log summary that share.sh logs --summary --json already prints to the host. Only the owner gets it, so the log's contents cross no new trust boundary.
  • Client rendering. app.js builds the panel with E("li", null, line) and E("h3", ...), which set text content. The log lines include guest-supplied error messages, but they are not inserted as HTML, so a guest cannot inject script into the owner's page. The panel adds no innerHTML use and no CSP change.
  • Owner-only menu entry. menuShow("health", Core.me.isOwner) only hides the menu item. The server enforces the real check.
  • import share as share_cli in server.py. share.py has no import-time side effects beyond reading an env var and constants. It runs its CLI only under __main__.
  • Refactor of summary_text. The text is now built from summary_sections. This changes only output layout, so no security control is touched.
  • Plugin manifests, workflows and trusted paths. The diff changes none of them: no plugin.json, marketplace.json or userConfig, no workflow, CODEOWNERS, .gitmodules or trusted-actors file. There are no manifest lines to report.
  • Instruction surfaces. The diff deletes or softens no standing instruction.
  • PR context. It contains no embedded directives aimed at the review.

Cost: the change adds no billed resource or paid setting. It spends no prepaid credit.

Not consulted: docs/conventions/instruction-exception-register/README.md. The diff removes no instruction, so it was not needed.

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed c693d09b6181e9def82f02f0341f0ceab77374d0: 0 finding(s), 0 as inline comments.

No findings. I read the whole diff and the PR context, and checked the changes against the code they touch. I did not run any tests or the browser suite. The PR's own "Not verified" list says they were not run either, so they are unconfirmed here.

Closing issue #9974 has one criterion: "Host Health panel: an owner-only view of the summary on the page."

  • The change meets it. GET /api/owner/health calls authorize("owner"), which answers 403 owner-only when X-Owner-Token is missing. The menu entry is shown only when Core.me.isOwner.
  • The change also adds tests that could fail if this broke: TestHostHealth covers the owner's read and the refusals for no identity, a guest and a leader. ui_telemetry.js covers the guest having no entry and the owner seeing sections.

What I checked:

  • summary_sections / summary_text: the refactor keeps the old plain-text layout. Sections are joined by blank lines, "none" placeholders and the rollback-rate line stay in place, and the only change is the documented blank line before the final "Repeats whose first entry…" line. test_share.py pins the titles and the layout.
  • Imports: share.py imports only detached, session_bridge and tunnel, so import share as share_cli in server.py creates no import cycle.
  • Route tables: the ROUTES-based auth tests in test_server.py cover POST routes only, so the new GET route needs no entry there.
  • Panel code: the helpers it uses exist in app.js and core.js (openSurface, placeNear, phone, Core.errorText). openSurface sets _anchor, which the re-place-after-load step relies on. The until(page, fn, arg) call matches its signature in browser_harness.js.
  • Rendering: guest-supplied log text (error messages) is added with textContent-based E(...) calls, so it cannot inject markup.
  • Spend: the change adds no billable resource, so there is no hold.

Changelog: the fragment's bump: minor fits a new owner-visible feature and route.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head c693d09b6181e9def82f02f0341f0ceab77374d0.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 9ed8717 Oct 26, 2026
47 of 48 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-9974-40232598751-1 branch October 26, 2026 08:13
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.

feat\(planning\): shared interview page observability follow-ups \(feature counts, rage and dead taps, Host Health, spike event\) - part 3 of 4

0 participants