diff --git a/.claude/hooks/session-start.sh b/.claude/hooks/session-start.sh new file mode 100755 index 0000000..4044a62 --- /dev/null +++ b/.claude/hooks/session-start.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -euo pipefail + +# Only run in Claude Code web sessions. +if [ "${CLAUDE_CODE_REMOTE:-}" != "true" ]; then + exit 0 +fi + +cd "$CLAUDE_PROJECT_DIR" + +# 1. Node dependencies. +if [ ! -d node_modules ] || [ package-lock.json -nt node_modules ] || [ package.json -nt node_modules ]; then + npm install --no-audit --no-fund +fi + +# 2. Playwright browser + OS libs for headless Chromium. +# Prefer --with-deps (installs apt packages Chromium needs). +# If that fails (e.g. broken third-party PPA), fall back to a plain +# browser install so tests can still run when libs are already present. +if ! npx --yes playwright install --with-deps chromium; then + echo "Warning: --with-deps failed, retrying without system deps..." >&2 + npx --yes playwright install chromium +fi diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..e06b033 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,14 @@ +{ + "hooks": { + "SessionStart": [ + { + "hooks": [ + { + "type": "command", + "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/session-start.sh" + } + ] + } + ] + } +} diff --git a/.gitignore b/.gitignore index ef1b670..ff7d55e 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,7 @@ dist/ playwright-report/ test-results/ tests/screenshots/ -.claude/ +.claude/* +!.claude/settings.json +!.claude/hooks/ +.claude/settings.local.json diff --git a/src/components/SectionHead.vue b/src/components/SectionHead.vue index 8c1ca9d..53b58ee 100644 --- a/src/components/SectionHead.vue +++ b/src/components/SectionHead.vue @@ -4,7 +4,7 @@
| {{ row[0] }} | +{{ row[0] }} |
{{ sel.value }} standard beer{{ sel.value === 1 ? '' : 's' }}
diff --git a/src/components/TheExchange.vue b/src/components/TheExchange.vue
index 4331314..617fd9f 100644
--- a/src/components/TheExchange.vue
+++ b/src/components/TheExchange.vue
@@ -10,46 +10,55 @@
- Official Conversion Engine
+ Official Conversion Engine
Convert between Bral and Beer.
-
+
-
- You deposit
+
{{ from }}
↓
+
-
- You receive
+
+ You receive
{{ fmt(result) }}
{{ to }}
+
@@ -63,7 +72,7 @@
≡ {{ fmt(result * 330) }} mL · {{ (result * 0.33).toFixed(2) }} L
- Historical Rate · BRAL / BEER
+ Historical Rate · BRAL / BEER
Stability, by design.
|