mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-08-01 16:43:37 +08:00
SKILL.md opens with a YAML frontmatter block. Passing it straight to the markdown renderer made the closing `---` a setext heading marker, so the whole block rendered as one giant bold <h2> above the document. Split the block out before rendering and lay it out as structured rows. Where it goes differs by context: - The detail sidebar, next to the market metadata. `slug`, `license` and `allowed-tools` are the same kind of data as `author` and `category`, just from a different source, and it is reference material -- it should never precede the document that explains what the skill does. Short scalars mirror the meta rows above them; arrays and long text stack, because 300px cannot do both on one line. - The file preview, as the file's header block. There the frontmatter genuinely is the top of the file being read, so removing it would misrepresent the file; it is styled as a header rather than a card so it does not compete with the body. This also covers SkillHub, whose `description` is the raw SKILL.md -- so the overview tab hit the same wall of bold text -- and puts ClawHub's already-parsed `descriptionFrontmatter` to use for the first time. Local installed skills previously flattened frontmatter into sidebar rows as comma-joined strings; they now share the same panel. The parser is a deliberately small YAML subset (scalars, inline and block sequences, block scalars) rather than a new dependency, since skill frontmatter is flat by convention. It never throws: a malformed or unterminated block returns the document untouched, and nested mappings are kept as raw YAML so nothing is silently dropped. Separately, the files tab was capped at a hard-coded 520px, leaving the bottom of the page empty. `min-h-full` on the flex column was not enough: a container sized by min-height keeps `height: auto`, so `flex-1`'s `flex-basis: 0%` cannot resolve and the panel falls back to content height -- measured 1215px of content inside a 720px viewport. A definite `lg:h-full` makes the panel claim the leftover space. Below lg the page scrolls as before. Walked through in a browser at three widths in both themes. check:desktop is green: 227 files, 2562 passing.
Claude Code Haha Desktop
基于 Tauri 2 + React 的桌面客户端。
开发
bun install
bun run tauri dev
构建
# macOS (Apple Silicon)
./scripts/build-macos-arm64.sh
# Windows (x64, MSI only)
.\scripts\build-windows-x64.ps1
构建产物位于 build-artifacts/ 目录,文件名会显式包含平台、架构和包类型。
常见问题
macOS 提示"已损坏,无法打开"
xattr -cr /Applications/Claude\ Code\ Haha.app