Skip to content

feat(chrome-devtools): auto-detect system Chrome, skip Chromium download, async spinner#58

Closed
hapo-nghialuu wants to merge 247 commits into
mainfrom
dev
Closed

feat(chrome-devtools): auto-detect system Chrome, skip Chromium download, async spinner#58
hapo-nghialuu wants to merge 247 commits into
mainfrom
dev

Conversation

@hapo-nghialuu

Copy link
Copy Markdown
Member

Thay đổi

Vấn đề

Khi cài @haposoft/cafekit, skill chrome-devtools tải Chromium ~300MB qua postinstall của puppeteer. Trên mạng chậm, bước này mất 5-10 phút không có progress bar, khiến người dùng tưởng installer bị treo. Spinner cũng đứng im do spawnSync block event loop.

Giải pháp (3 tầng)

1. Installer — auto-detect Chrome hệ thống

  • Trước npm install: detect Chrome tại OS paths (macOS/Windows/Linux)
  • Nếu có → set PUPPETEER_SKIP_DOWNLOAD=true → không tải 300MB
  • Nếu không → tải Chromium với progress bar native (stdio: inherit)

2. Runtime — browser.js auto-detect

  • Fallback chain: CHROME_EXECUTABLE_PATHPUPPETEER_EXECUTABLE_PATH → OS auto-detect → bundled Chromium
  • Hoạt động ngay không cần config

3. Async spinner — không đơ nữa

  • spawnSyncspawn + Promise cho toàn bộ pipeline (venv, pip, npm, chromium)
  • Spinner animate ⠙⠹⠸⠼ mượt từ bước đầu tiên

Files (7 files, +223/-39)

File Thay đổi
browser.js Thêm resolveExecutablePath()
skill-deps.js detectSystemChrome(), runAsync(), async hóa toàn bộ
skills-setup.js Detect Chrome trước install, async setup
i18n.js Key mới chromiumSystemChromeFound (EN/JA/VI)
.env.example Template cấu hình Chrome (mới)
SKILL.md Document Chrome Configuration
package.json Bump 0.11.70.11.10

Test

  • 137 tests PASS
  • End-to-end: navigate.js + screenshot.js dùng Chrome hệ thống, cache 0B
  • Spinner animate xác nhận qua integration test
  • Progress bar native xác nhận qua pseudo-TTY test

🤖 Generated with Claude Code

hapo-nghialuu and others added 30 commits February 9, 2026 14:57
refactor: restructure .claude folder and add unified /docs command
refactor: optimize framework token usage and add unified docs command
feat(spec): release v0.1.4 with docs command and streamlined installer
fix(antigravity): install workflows to correct directory
- Add Claude Code and Antigravity SVG logos
- Replace emoji icons with official logos in platform cards
- Update Card component to support optional title prop
- Redesign DecisionTree with sequential spec workflow
- Use grayscale colors matching docs theme
- Show only Claude Code style commands
- Remove legend from decision tree

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move "CafeKit Spec là gì?" / "What is CafeKit Spec?" to top
- Place intro section before "Chọn Command" / "Choose Your Command"
- Keep decision tree and platform cards after intro

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add "Documentation Automation" feature with BookOpen icon
- Update features grid to 4 columns layout
- Update QuickStart code example to include /docs init and /docs update
- Show complete workflow: install → docs init → spec workflow → docs update

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add locale prop to DecisionTree component ('en' | 'vi')
- Create translations object for both languages
- Update Vietnamese (default) and English index.mdx files
- Translate title, description, conditions, and labels

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change default language from Vietnamese to English for the docs page.
Users accessing /docs will now see English content by default.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…etails

- Fix backup location from docs/.backups/ to docs.backup.{timestamp}/
- Add --focus and --dir flags documentation
- Update AGENTS.md location (.agent/rules/AGENTS.md for always-active)
- Add Error Handling section for both init and update commands
- Clarify AI reference file locations for Antigravity vs Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move repomix from a separate subsection to the main Prerequisites list
since it's required for /docs init command. Also simplified the
Documentation Setup section to avoid duplicate installation instructions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SearchDialog and LanguageSwitcher use @base-ui/react which generates
random IDs that differ between server and client. Added mounted state
to only render these components after client-side mount, preventing
hydration mismatches.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Repomix is already listed in Prerequisites, so removed the redundant
"(requires repomix)" note from the Documentation Setup section.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove duplicate content/ folder (content now only in public/content/)
- Remove unused guides/ folder
- Add missing index pages for platforms and reference sections
- Update docs-config: reorder sidebar (Docs Workflows before Spec Workflows)
- Fix breadcrumbs to support locale-based translations
- Update quickstart guides to recommend /docs init before creating specs
- Fix repomix prerequisite display in installation page
- Add Getting Started section index page (then removed per request)
- Update en/vi index pages: reorder Quick Links and Learning Path

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…er template

- Add antigravity-overview.md with IDE features, comparison, and pricing
- Add antigravity-agent-skill-workflow.md with detailed agent/skill/workflow guide
- Simplify GEMINI.md to starter template version (remove Agent Routing, TIER 2, scripts, fix git conflict)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…implified-gemini

docs(antigravity): add overview docs and simplify GEMINI.md for starter template
hapo-nghialuu and others added 29 commits June 2, 2026 11:34
…cture

feat(install): CafeKit 0.11.0 — i18n, skill deps, version check, 3 gap fixes
feat(cafekit-web): implement contact form section
…ship .env.example

- Add cafekit-web/.env.example with CONTACT_API_ENDPOINT placeholder for safe deployment
- Update .gitignore to explicitly allow .env.example (while still ignoring real .env*)
- Remove default URL fallback in contact/route.ts so endpoint must be configured via env (prevents accidental prod calls during dev)
fix(cafekit-web): remove hardcoded CONTACT_API_ENDPOINT fallback and ship .env.example
Step-by-step guide for absolute newcomers: 7 interactive steps with
animated terminal, "what you'll see" checklist, troubleshooting, and
inline glossary. Step 0 closes the Claude Code prerequisite gap that
blocked first-time users. All three locales ship together.

New components:
- tutorial-types.ts              shared types
- tutorial-content.{en,vi,ja}.ts 7-step content per locale
- tutorial-content.ts            getTutorialContent(locale) accessor
- tutorial-step-terminal.tsx     animated terminal (client, per-step)
- tutorial-step-panel.tsx        step content panel (prereqs + terminal steps)
- tutorial-guide.tsx             step rail shell + recap panel
- docs/{en,vi,ja}/tutorial.mdx  thin MDX wrappers
…ckstart

- docs-config: add tutorial route + page() labels for en/vi/ja so
  sidebar, search, and pager all resolve the new page automatically
- mdx-components: register TutorialGuide for MDX use
- quickstart.mdx (×3): add Callout directing newcomers to the tutorial
- quick-start.tsx + landing-translations: add newcomer banner linking
  to /docs/tutorial below the quickstart code block on the homepage
…debar

- tutorial-guide.tsx: add `relative` to hero section so absolute inset-0
  overlay stays contained; without it the overlay covered the whole page
  and blocked all button clicks including Next
- docs-config.ts: split sidebar into Docs + Tutorials sections; Tutorial
  now has its own "Tutorials" section (en/vi/ja); rename "Start here" → "Docs"
The tutorial's install step previously showed simplified generic output.
Updated to match the actual interactive installer UX: language prompt,
platform selection, addressing config, skill dependencies (Python/npm/
Chromium), and real summary counts (installed/updated/unchanged).
Also restore JA locale start label from accidentally-set "Docs" back
to original "はじめに".
…idebar

TOC had top-[82px] / h-[calc(100vh-5rem)] while left sidebar uses
top-[64px] / h-[calc(100vh-4rem)]. Unified both to match so the two
sidebars start and end at the same vertical level.
- sidebar: py-8 → py-6 so content starts closer to header
- main: py-8 lg:py-10 → py-6 lg:py-8 to match sidebar rhythm
- TOC: add mt-2 for subtle visual balance
feat(cafekit-web): interactive from-zero tutorial page (en/vi/ja)
Add auto-activation metadata to all 30 skills so Claude Code can match
intent to the right skill at startup, matching the reference ClaudeKit
schema. Each SKILL.md now declares user-invocable, when_to_use, category,
and keywords, and normalizes version into a metadata block.

- 30 skills (x2 source + installed): +4 frontmatter fields, version → metadata.version
- impact-analysis: name → hapo:impact-analysis for branding consistency
- agents: activate skills by directory name (git) instead of frontmatter name (hapo:git)
- CLAUDE.md: generic "analyze the skills catalog and activate" guidance
- self-tests updated to match; 42 pass / 0 fail

The hapo: prefix is kept only as a display/branding label in frontmatter
name and routing tables; skills are invoked by their directory name.
- Skill auto-activation metadata (when_to_use, user-invocable, category, keywords) added to all 30 skills
- Normalized metadata.version across all skills
- Agent skill activation by directory name
- CLAUDE.md generic skill guidance
- impact-analysis branding fix
- Status line: active spec indicator
Move py-* from <main> into <article> so right sidebar is no longer
affected by main's padding. Both sidebars now start at the same
vertical position: left sidebar py-6, right TOC py-6.
- Add interactive prompts when CafeKit is already installed:
  * Same version: ask to reinstall or skip
  * Upgrade available: show current→new and ask to update/reinstall/skip
  * Display clear version information in all prompts
- Redesign intro banner with cleaner visuals
- Reduce update check cache TTL from 12h to 1h
- Add new i18n keys for the new prompts (en/ja/vi)

Bumps version to 0.11.4

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fixes interactive version prompt

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Streamlined update flow

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add npm registry fetch (registry.js) to retrieve 5 most recent
  versions with 3 s timeout and offline fallback
- Replace 3-option upgrade menu with interactive version picker;
  selecting a non-current version re-execs npx @haposoft/cafekit@<v>
  with --force-overwrite to skip the picker on the child run
- Skip language prompt when runtime.json already has a saved locale;
  restore lang silently via setLang
- Skip platform prompt when cafekit.json exists; fixes latent bug
  where guard used ctx.isUpdate before checkVersions set it
- Add 8 i18n keys (en/ja/vi): langKept, platformKept, installingFor,
  versionPickPrompt, versionPickCurrent, versionPickLatest,
  versionReexec, versionFetchFailed
Version picker + skip lang/platform on re-install
Remove all .claude changes introduced by this branch and restore to the
dev branch baseline (SHA 5cb40a4). Skill metadata, agent rewrites, hooks,
rules, and references will be shipped separately via the CafeKit installer.
…ment

feat(skills): align skill auto-activation with reference kit
fix(cafekit-web): fix left/right sidebar vertical alignment
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.

2 participants