Skip to content

Integrate and fix contributor PRs #865, #868, #869, #870 - #875

Merged
SawyerHood merged 13 commits into
mainfrom
integration/contributor-pr-fixes
Jul 27, 2026
Merged

Integrate and fix contributor PRs #865, #868, #869, #870#875
SawyerHood merged 13 commits into
mainfrom
integration/contributor-pr-fixes

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

Supersedes #865, #868, #869, and #870 — all four reviewed, fixed, and integrated into one branch.

Each original PR was reviewed against a local checkout (not from the diff), and each had defects. This branch keeps every contributor commit with its original authorship and adds one follow-up commit per PR.

What's here

Original Author What the review found Follow-up
#868 Docs YAML frontmatter @amadad Any text between two --- lines was treated as frontmatter, so a document opening with a thematic break had its first section hidden from the editor, nav titles, and previews. The blank line after frontmatter was dropped on every save. renameToTitle bailed on any frontmatter. Previews dropped the first heading of any level. Frontmatter is only recognised when the fenced block parses to a YAML mapping; the body's leading newline is replayed on save; rename gates on the parsed title; only a title-matching heading is excluded from the preview. 47 → 57 tests.
#869 remark-directive colons @bhuvansingla Real bug, real fix — but two tests were left red, and the change also rewrote container directives, which stopped nested plugin directives from mounting and collapsed ::: blocks onto one line. Rewrite narrowed to textDirective; containers left on the previous path; the literal is merged into an adjacent text node; stale assertions updated; regression test added for the reported symptom.
#865 Project machine picker @amadad The single-machine gate counted every non-destroyed enrollment, so one machine offline for a month silently replaced the native OS folder picker. Two smaller states could submit into a silent no-op. Gate counts connected machines; a still-loading host list is treated as not-single-machine; the all-offline state renders an empty state and blocks submit; the target host is now a required parameter.
#870 Quiet skill dedup logs @amadad Correct change, three broken tests — the capturing logger stubbed debug out entirely. Test logger captures debug; the three assertions were retargeted, not deleted.

#867 (Pi SDK upgrade) is deliberately not included. It still has a blocking defect: Pi advertises max reasoning while PI_SERVER_CAPABILITIES caps at xhigh, so setting the override persists and then 400s on the next turn.

Verification

Automated, via Turbo:

pnpm exec turbo run test typecheck --filter=@bb/app --filter=@bb/server --filter=bb-plugin-simple-notes --force

@bb/app                  typecheck clean · tests pass
bb-plugin-simple-notes   3 files · 57 tests passed   (was 47)
@bb/server               146/148 files · 1253/1255 tests

Both server failures are environmental and pass individually: internal-skill-trees.test.ts expects mode: 420 (0644) and gets 436 under umask 0002 — it also fails on main, and passes under umask 022; public-host-management.test.ts hit a 5s per-test timeout under concurrent load and passes alone in 883ms.

Live QA against a running dev instance on this exact tree:

  • Fix Docs YAML frontmatter parsing #868 — thematic-break document visible and editable again (2 <hr>, both sections); blank line after frontmatter survives a real autosave, verified with cat -A on the saved bytes; a title-less-frontmatter doc renames to follow its H1 while a frontmatter-titled one stays put; a non-title H2 survives in the preview.
  • fix(app): stop remark-directive from eating colons in assistant messages #869 — a real Haiku turn emitting the fixture renders Meeting at 9:30 and 10:45 today. as a single #text node with zero injected empty <div>s, and :::note still wraps a real <strong> in a DIV.
  • Let New project select an execution machine #865 — with a second machine seeded 30 days offline, the picker auto-selects the connected machine and renders the offline one disabled behind an Offline badge. The native-picker path itself needs the Electron shell and is covered by hook tests only.
  • Demote skill-tier override dedup logs to debug #870 — with a planted bb-cli skill collision, five catalog resolutions produced five override lines, all at level 20, zero at level 30.

Also checked under a dark Nord palette and at a 760px width.

Known, not fixed

Three cosmetic issues that all reproduce on main and are not regressions from this branch:

  1. Documents opening with a bare --- still title as --- in the Docs nav — cleanLine only strips list markers when whitespace follows the dash. This is main behaviour and Fix Docs YAML frontmatter parsing #868's fix restores it exactly, but it's the same symptom Fix Docs YAML frontmatter parsing #868 set out to remove.
  2. The trailing newline is still dropped when the Docs editor saves — pre-existing Tiptap round-trip behaviour.
  3. useQuickCreateProject now gates on connected machines while ProjectPathDialog still computes showMachinePicker from the total. Harmless today; worth unifying.

Separately: none of the five PRs had any CI (gh pr checks reported no checks on every branch), and three were red against main's suite.

Co-authored-by: Ali Madad ali@scty.org
Co-authored-by: Bhuvan Singla bhuvansingla2000@gmail.com

🤖 Generated with Claude Code

amadad and others added 13 commits July 24, 2026 15:07
remark-directive (enabled for plugin directives like ::inline-vis{...})
also parses inline :name and block :::name directives, so any colon
before a letter or digit (9:30, key:value, :D) became a directive node.

remarkMessageDirectives only handled leaf (::name) directives; text and
container directives fell through to mdast-util-to-hast, which renders an
unknown directive as an empty <div>. Inside a paragraph that split the
line and dropped the directive's text.

Handle all three kinds: leaf directives mount as before; text and
container directives are rewritten back to their literal source (text
inline, container as a paragraph). Display-only change.
Every catalog resolution (each thread turn and project-page load) logs
one line per deduped skill; with a 71-skill inherited root that is
~30K journald lines/day of expected-precedence noise.
PR #870 demoted the skill-tier override dedup logs from info to debug,
but the capturing logger in the injected-skills test stubbed debug out as
a no-op, so the three precedence tests asserting on those messages saw an
empty infos array and failed.

Add a debugs capture alongside infos/warnings, wire debug through
captureTo, and point the three override assertions at debugs. The
assertions are preserved rather than dropped: they are the only coverage
that precedence actually excludes the shadowed source.

Co-authored-by: Ali Madad <ali@scty.org>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Follow-ups on the machine-selection change:

- Gate the picker on connected machines, not every non-destroyed one. A
  single stale enrollment was enough to replace the native OS folder
  picker with the in-app remote browser, even though the offline machine
  could not be selected.
- Treat a still-loading host list as "not single machine". The list query
  resolves independently of the local-daemon probe that enables the New
  project button, so a fast click could fall through to the native picker
  on the primary host and skip the machine choice entirely.
- Stop the multi-machine/none-connected state from offering a submit that
  is silently dropped. The dialog now shows an offline empty state instead
  of the meaningless manual-path input and keeps submit disabled, and
  useLocalPathPicker takes the target host explicitly — the old default
  parameter only covered an omitted argument, never the explicit null the
  dialog sends when nothing is selected.
- Drop the stray Diátaxis marker from docs/multiple-devices.md; it was the
  only occurrence in the repo and nothing reads it.
- Add the machine picker and all-offline states to the dialog stories.

Co-authored-by: Ali Madad <ali@scty.org>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review follow-ups on the YAML frontmatter change:

- parseMarkdownDocument treated any text between two `---` lines as
  frontmatter, so a document opening with a thematic break had its opening
  section hidden from the editor, nav titles, and previews. Require the
  fenced block to parse as a YAML mapping (or as nothing) first.
- The rich editor dropped the blank line between frontmatter and body on the
  first save, giving every canonical `---\n\n# Heading` document a spurious
  diff line. Replay the body's leading line breaks on save, and give the
  round-trip fixture the blank line it was missing.
- renameToTitle bailed on any frontmatter, so a document with only `tags:`
  silently stopped following its H1. Gate on the parsed title instead.
- The search preview dropped the first heading of any level whenever
  frontmatter supplied a title. Only drop a heading that repeats the title.
- Drop the loading-state test that asserted on Tailwind class names.

Co-authored-by: Ali Madad <ali@scty.org>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Follow-up to the remark-directive colon fix.

- Update two stale assertions in markdown-thread-mentions.test.tsx. The
  rewritten prose is now one text node, so `getByText("@thread")` — which
  joins only an element's direct text-node children — no longer matches.
  Assert the paragraph's textContent instead.
- Leave container directives (`:::name`) on the default rendering path.
  `:::` at the start of a line is not incidental prose the way an inline
  `:` is, and rewriting the block to literal text both stopped a nested
  registered `::name` from mounting and collapsed the block onto one line.
- Merge the rewritten text directive into an adjacent `text` sibling so a
  paragraph containing `9:30` is indistinguishable from one that never
  parsed as a directive.
- Add a regression test for the originally reported symptom: "Meeting at
  9:30 and 10:45 today." rendered as "Meeting at 9 and 10 today.".

Co-authored-by: Bhuvan Singla <bhuvansingla2000@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@SawyerHood
SawyerHood merged commit c01caa8 into main Jul 27, 2026
10 checks passed
@SawyerHood
SawyerHood deleted the integration/contributor-pr-fixes branch July 27, 2026 18:25
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.

3 participants