fix(whiteboard): the prose should match overlay.js behavior #48

Merged
jercik merged 2 commits from align/whiteboard into main 2026-08-07 07:09:07 +00:00
Owner

Two prose claims contradicted the shipped overlay: the SVG is not capped to max-width:100% (overlay.js line 59 sets max-width: none for the infinite canvas), and the gesture description had zoom on plain scroll — the wheel handler pans on plain scroll and zooms only on pinch / ⌘-scroll. Both corrected.

The rest is deletion: four Notes/intro bullets that restate what the steps already establish (comment-target kinds, the missing-open escape hatch, the tiny-files elaboration, the not-standalone restatement).

Two prose claims contradicted the shipped overlay: the SVG is not capped to `max-width:100%` (overlay.js line 59 sets `max-width: none` for the infinite canvas), and the gesture description had zoom on plain scroll — the wheel handler pans on plain scroll and zooms only on pinch / ⌘-scroll. Both corrected. The rest is deletion: four Notes/intro bullets that restate what the steps already establish (comment-target kinds, the missing-`open` escape hatch, the tiny-files elaboration, the not-standalone restatement).
fix(whiteboard): the prose should match overlay.js behavior
Some checks failed
Node tests / node:test (pull_request) Successful in 17s
commit-msg / commitlint (pull_request) Successful in 28s
PR Review / Prepare immutable review tools (pull_request_target) Successful in 3m1s
PR Review / forgejo-review-code-smart-2 generator (pull_request_target) Failing after 1m42s
PR Review / forgejo-review-approach-3 generator (pull_request_target) Failing after 1m42s
PR Review / forgejo-review-approach-smart-2 generator (pull_request_target) Failing after 1m42s
PR Review / forgejo-review-approach-smart-1 generator (pull_request_target) Successful in 2m9s
PR Review / forgejo-review-code-smart-1 generator (pull_request_target) Successful in 2m45s
PR Review / Dispatch and observe exact review writers (pull_request_target) Failing after 3m2s
453db9876c
forgejo-actions left a comment

Approach review: Right approach. This is a docs-only correction that fixes the prose to match the shipped overlay.js rather than changing behavior to match the docs, which is the correct direction for a skill whose code is already the contract.

Both factual claims verified against the working tree:

  • overlay.js:59 sets #stage svg { display: block; max-width: none; }, so dropping the max-width:100% cap claim is correct for the infinite canvas.
  • overlay.js:243-252: the wheel handler zooms only when e.ctrlKey || e.metaKey (trackpad pinch arrives as ctrlKey) and otherwise pans with tx -= e.deltaX; ty -= e.deltaY. dblclick on empty canvas calls center(). The new "drag the background or scroll to pan, pinch or ⌘/Ctrl-scroll to zoom, double-click … to reset" wording matches.

The deletions are sound trimming: the comment-target kinds are already established by step 4 ("Click any element (node or relation)" plus the Review panel's whole-diagram notes), and the tiny-files and not-standalone lines were restatements. One exception is noted inline — the non-macOS open fallback is not covered elsewhere.

No material alternative to suggest.

Approach review by Claude Code Opus (opus)

**Approach review:** Right approach. This is a docs-only correction that fixes the prose to match the shipped `overlay.js` rather than changing behavior to match the docs, which is the correct direction for a skill whose code is already the contract. Both factual claims verified against the working tree: - `overlay.js:59` sets `#stage svg { display: block; max-width: none; }`, so dropping the `max-width:100%` cap claim is correct for the infinite canvas. - `overlay.js:243-252`: the wheel handler zooms only when `e.ctrlKey || e.metaKey` (trackpad pinch arrives as `ctrlKey`) and otherwise pans with `tx -= e.deltaX; ty -= e.deltaY`. `dblclick` on empty canvas calls `center()`. The new "drag the background or scroll to pan, pinch or ⌘/Ctrl-scroll to zoom, double-click … to reset" wording matches. The deletions are sound trimming: the comment-target kinds are already established by step 4 ("Click any element (node or relation)" plus the Review panel's whole-diagram notes), and the tiny-files and not-standalone lines were restatements. One exception is noted inline — the non-macOS `open` fallback is not covered elsewhere. No material alternative to suggest. _Approach review by Claude Code Opus (opus)_ <!-- axrecipe-review:v1:eyJzY2hlbWFWZXJzaW9uIjoxLCJzdGF0ZSI6InB1Ymxpc2hlZCIsInJlcG9zaXRvcnkiOiJqNGstb3NzL2FnZW50LXNraWxscyIsIm51bWJlciI6IjQ4IiwiaGVhZFNoYSI6IjQ1M2RiOTg3NmM1MTEyNGE0YTNiZjU2NzJiOWRiYzMxODViZTJmZjQiLCJzbG90IjoiZm9yZ2Vqby1yZXZpZXctYXBwcm9hY2gtc21hcnQtMSIsInNvdXJjZVdvcmtmbG93UnVuSWQiOiIxNzczOCIsInNvdXJjZUdlbmVyYXRvckF0dGVtcHQiOiIxIiwicmVzdWx0SWQiOiIwNjJjMzk1OC0yZDQ3LTQwY2UtYThmZi00MDcwZjg2MzhiZDMifQ== -->
@ -110,3 +105,3 @@
`overlay.js` in the same folder (fine for the ephemeral temp dir).
- `overlay.js` is loaded as a classic script (not an ES module) on purpose: ES
modules are blocked by CORS on `file://`, classic same-folder scripts are not.
- If the user has no `open` (non-macOS), give them the file path to open manually.

Unlike the other three deletions, this one isn't restated by the steps. Step 4 gives only open "$OUT" (macOS), so after this removal the skill has no guidance for a non-macOS run — and these skills are delivered to agents on Linux as well. Consider keeping the bullet, or folding it into step 4 (e.g. open "$OUT" on macOS, otherwise print the path for the user to open manually).

Unlike the other three deletions, this one isn't restated by the steps. Step 4 gives only `open "$OUT"` (macOS), so after this removal the skill has no guidance for a non-macOS run — and these skills are delivered to agents on Linux as well. Consider keeping the bullet, or folding it into step 4 (e.g. `open "$OUT"` on macOS, otherwise print the path for the user to open manually).
Author
Owner

Agreed — this was the one deletion that removed unique instruction rather than a restatement. Fixed in 936fe5f by folding the fallback into step 4 (open "$OUT" (macOS); where open is unavailable, give the user the file path to open manually), per your suggested shape: the guidance now lives at the point of use instead of returning as a Notes bullet, which keeps the PR's restatement trimming intact.

Agreed — this was the one deletion that removed unique instruction rather than a restatement. Fixed in 936fe5f by folding the fallback into step 4 (`open "$OUT"` (macOS); where `open` is unavailable, give the user the file path to open manually), per your suggested shape: the guidance now lives at the point of use instead of returning as a Notes bullet, which keeps the PR's restatement trimming intact.
jercik marked this conversation as resolved
forgejo-actions left a comment

Summary: Found 1 medium issue.

Both prose corrections verify against the shipped overlay: overlay.js:59 sets #stage svg { max-width: none; }, so the removed max-width:100% claim was indeed wrong, and the wheel handler at overlay.js:243-252 zooms only under e.ctrlKey || e.metaKey (what browsers synthesize for trackpad pinch) and pans on plain scroll via tx -= e.deltaX; ty -= e.deltaY. Background drag-to-pan (mousedown) and double-click-to-reset (center()) also match the new sentence.

Three of the four deletions are genuine restatements. The fourth — the non-macOS open fallback — carried instruction that no step establishes elsewhere; see the inline comment.

Code review by Claude Code Opus (opus)

**Summary:** Found 1 medium issue. Both prose corrections verify against the shipped overlay: `overlay.js:59` sets `#stage svg { max-width: none; }`, so the removed `max-width:100%` claim was indeed wrong, and the wheel handler at `overlay.js:243-252` zooms only under `e.ctrlKey || e.metaKey` (what browsers synthesize for trackpad pinch) and pans on plain scroll via `tx -= e.deltaX; ty -= e.deltaY`. Background drag-to-pan (`mousedown`) and double-click-to-reset (`center()`) also match the new sentence. Three of the four deletions are genuine restatements. The fourth — the non-macOS `open` fallback — carried instruction that no step establishes elsewhere; see the inline comment. _Code review by Claude Code Opus (opus)_ <!-- axrecipe-review:v1:eyJzY2hlbWFWZXJzaW9uIjoxLCJzdGF0ZSI6InB1Ymxpc2hlZCIsInJlcG9zaXRvcnkiOiJqNGstb3NzL2FnZW50LXNraWxscyIsIm51bWJlciI6IjQ4IiwiaGVhZFNoYSI6IjQ1M2RiOTg3NmM1MTEyNGE0YTNiZjU2NzJiOWRiYzMxODViZTJmZjQiLCJzbG90IjoiZm9yZ2Vqby1yZXZpZXctY29kZS1zbWFydC0xIiwic291cmNlV29ya2Zsb3dSdW5JZCI6IjE3NzM4Iiwic291cmNlR2VuZXJhdG9yQXR0ZW1wdCI6IjEiLCJyZXN1bHRJZCI6IjViM2E5YWJmLTI0MjItNGNiNC04OTE3LTcwYTEzNzA1ODIzZiJ9 -->
@ -110,3 +105,3 @@
`overlay.js` in the same folder (fine for the ephemeral temp dir).
- `overlay.js` is loaded as a classic script (not an ES module) on purpose: ES
modules are blocked by CORS on `file://`, classic same-folder scripts are not.
- If the user has no `open` (non-macOS), give them the file path to open manually.

🟡 Medium: This bullet is not a restatement of the steps — it is the only non-macOS guidance in the skill, and removing it leaves a behavioral gap.

Step 4 says only `open "$OUT"` (macOS) and never covers what to do when open is absent. On most Linux distributions open is not a command at all, so an agent following the skill on a non-mac host gets a failed invocation with no documented recovery. Worse, the Chat output section still mandates emitting exactly one line of the form auth-flow is open — …, so the user is told the diagram is open when it is not, and is never given the file path to open it themselves.

Suggest keeping the bullet (or folding the fallback into step 4), e.g.:

4. **Open it.** `open "$OUT"` (macOS); where `open` is unavailable, give the user
   the file path to open manually.
🟡 **Medium:** This bullet is not a restatement of the steps — it is the only non-macOS guidance in the skill, and removing it leaves a behavioral gap. Step 4 says only `` `open "$OUT"` (macOS) `` and never covers what to do when `open` is absent. On most Linux distributions `open` is not a command at all, so an agent following the skill on a non-mac host gets a failed invocation with no documented recovery. Worse, the **Chat output** section still mandates emitting exactly one line of the form `auth-flow is open — …`, so the user is told the diagram is open when it is not, and is never given the file path to open it themselves. Suggest keeping the bullet (or folding the fallback into step 4), e.g.: ```markdown 4. **Open it.** `open "$OUT"` (macOS); where `open` is unavailable, give the user the file path to open manually. ```
Author
Owner

Valid finding — of the four deletions this was the only one carrying instruction stated nowhere else, so it gets a fix rather than a defense. Fixed in 936fe5f using your suggested fold: step 4 now reads open "$OUT" (macOS); where open is unavailable, give the user the file path to open manually. Folding it into the step rather than restoring the Notes bullet keeps the guidance at the point of use and preserves the PR's trimming of restated bullets.

On the Chat output aggravation: the mandated one-liner is scoped by "After opening the diagram", which no longer misfires — an agent that cannot open now follows step 4's instruction and hands the user the path instead of claiming the diagram is open.

Valid finding — of the four deletions this was the only one carrying instruction stated nowhere else, so it gets a fix rather than a defense. Fixed in 936fe5f using your suggested fold: step 4 now reads `open "$OUT"` (macOS); where `open` is unavailable, give the user the file path to open manually. Folding it into the step rather than restoring the Notes bullet keeps the guidance at the point of use and preserves the PR's trimming of restated bullets. On the Chat output aggravation: the mandated one-liner is scoped by "**After opening the diagram**", which no longer misfires — an agent that cannot `open` now follows step 4's instruction and hands the user the path instead of claiming the diagram is open.
jercik marked this conversation as resolved
fix(whiteboard): fold the non-macOS open fallback into step 4
Some checks failed
Node tests / node:test (pull_request) Successful in 10s
commit-msg / commitlint (pull_request) Successful in 18s
PR Review / Prepare immutable review tools (pull_request_target) Successful in 1m29s
PR Review / forgejo-review-approach-smart-1 generator (pull_request_target) Has been skipped
PR Review / forgejo-review-approach-smart-2 generator (pull_request_target) Has been skipped
PR Review / forgejo-review-approach-3 generator (pull_request_target) Has been skipped
PR Review / forgejo-review-code-smart-2 generator (pull_request_target) Failing after 35s
PR Review / forgejo-review-code-smart-1 generator (pull_request_target) Successful in 2m42s
PR Review / Dispatch and observe exact review writers (pull_request_target) Failing after 2m56s
936fe5fc62
The removed Notes bullet was the skill's only non-macOS guidance; without
it an agent on Linux has no documented recovery when `open` is missing.
Flagged by both managed reviews on the previous head.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
forgejo-actions left a comment

Summary: No actionable issues found.

Docs-only change to skills/whiteboard/SKILL.md. I verified both prose corrections against the shipped overlay.js rather than taking the PR description at its word:

  • max-width claim. overlay.js:59 is #stage svg { display: block; max-width: none; }, so the removed sentence "it is capped to max-width:100%" was genuinely wrong. Dropping it is correct.
  • Gesture description. The wheel handler (overlay.js:243-254) zooms only under e.ctrlKey || e.metaKey and otherwise pans via tx -= e.deltaX; ty -= e.deltaY. Background drag pans (mousedown at :226) and dblclick calls center() (:233-236), which resets scale to 1 and re-centers. The new wording — drag or scroll to pan, pinch or ⌘/Ctrl-scroll to zoom, double-click to reset — matches all three.

The four deletions are redundant with content the steps already carry: comment targets are established by step 1 (data-id on nodes and relation <g>s), step 4 ("Click any element (node or relation)", Review-panel whole-diagram notes), and step 5's pasted-feedback format, which I confirmed matches buildFeedbackMarkdown exactly (overlay.js:19-28: the ## Feedback on diagram … header, > blockquote for the overall note, - **[element: id]** bullets).

The one deletion that did lose information — the non-macOS open fallback, the skill's only Linux guidance — is restored in follow-up commit 936fe5f, folded into step 4. No gap remains.

Code review by Claude Code Opus (opus)

**Summary:** No actionable issues found. Docs-only change to `skills/whiteboard/SKILL.md`. I verified both prose corrections against the shipped `overlay.js` rather than taking the PR description at its word: - **`max-width` claim.** `overlay.js:59` is `#stage svg { display: block; max-width: none; }`, so the removed sentence "it is capped to `max-width:100%`" was genuinely wrong. Dropping it is correct. - **Gesture description.** The wheel handler (`overlay.js:243-254`) zooms only under `e.ctrlKey || e.metaKey` and otherwise pans via `tx -= e.deltaX; ty -= e.deltaY`. Background drag pans (`mousedown` at `:226`) and `dblclick` calls `center()` (`:233-236`), which resets scale to 1 and re-centers. The new wording — drag or scroll to pan, pinch or ⌘/Ctrl-scroll to zoom, double-click to reset — matches all three. The four deletions are redundant with content the steps already carry: comment targets are established by step 1 (`data-id` on nodes and relation `<g>`s), step 4 ("Click any element (node or relation)", Review-panel whole-diagram notes), and step 5's pasted-feedback format, which I confirmed matches `buildFeedbackMarkdown` exactly (`overlay.js:19-28`: the `## Feedback on diagram …` header, `>` blockquote for the overall note, `- **[element: id]**` bullets). The one deletion that did lose information — the non-macOS `open` fallback, the skill's only Linux guidance — is restored in follow-up commit `936fe5f`, folded into step 4. No gap remains. _Code review by Claude Code Opus (opus)_ <!-- axrecipe-review:v1:eyJzY2hlbWFWZXJzaW9uIjoxLCJzdGF0ZSI6InB1Ymxpc2hlZCIsInJlcG9zaXRvcnkiOiJqNGstb3NzL2FnZW50LXNraWxscyIsIm51bWJlciI6IjQ4IiwiaGVhZFNoYSI6IjkzNmZlNWZjNjIwYzRiNjMxYTBjNTdlM2RiOTYwMDZhMDJmMDMzMmQiLCJzbG90IjoiZm9yZ2Vqby1yZXZpZXctY29kZS1zbWFydC0xIiwic291cmNlV29ya2Zsb3dSdW5JZCI6IjE3ODA2Iiwic291cmNlR2VuZXJhdG9yQXR0ZW1wdCI6IjEiLCJyZXN1bHRJZCI6IjA2MmQ1ZWYyLTliMGUtNGM3NC05MDM2LWE3NzdiNjBjYmMwYSJ9 -->
jercik merged commit 1a8cb05dc1 into main 2026-08-07 07:09:07 +00:00
jercik deleted branch align/whiteboard 2026-08-07 07:09:07 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
j4k-oss/agent-skills!48
No description provided.