Skip to content

Commit c6ba14e

Browse files
Add CI workflow, remove welcome screen, fix cache dir creation
- GitHub Actions CI: build + type check + snapshot on Ubuntu, macOS, Windows with Node 18/20/22 - Remove welcome screen — go straight to dashboard on first run - Fix update-check cache: create config dir if needed (ensures 24h cache works on fresh installs) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent cd605b8 commit c6ba14e

3 files changed

Lines changed: 56 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
build-and-test:
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, macos-latest, windows-latest]
14+
node: [18, 20, 22]
15+
fail-fast: false
16+
17+
runs-on: ${{ matrix.os }}
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node }}
25+
26+
- name: Install dependencies
27+
working-directory: packages/cli
28+
run: npm ci
29+
30+
- name: Type check
31+
working-directory: packages/cli
32+
run: npx tsc --noEmit
33+
34+
- name: Build
35+
working-directory: packages/cli
36+
run: npx tsup
37+
38+
- name: Version check
39+
working-directory: packages/cli
40+
run: node dist/index.js --version
41+
42+
- name: Demo snapshot renders
43+
working-directory: packages/cli
44+
run: node dist/index.js --demo --snapshot
45+
env:
46+
COLUMNS: '120'
47+
LINES: '38'
48+
49+
- name: CLI list command
50+
working-directory: packages/cli
51+
run: node dist/index.js list --json

packages/cli/src/core/update-check.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ function readCache(): UpdateCache | null {
3232

3333
function writeCache(latestVersion: string): void {
3434
try {
35-
fs.writeFileSync(getCachePath(), JSON.stringify({ latestVersion, checkedAt: Date.now() }));
35+
const cachePath = getCachePath();
36+
fs.mkdirSync(path.dirname(cachePath), { recursive: true });
37+
fs.writeFileSync(cachePath, JSON.stringify({ latestVersion, checkedAt: Date.now() }));
3638
} catch { /* ignore */ }
3739
}
3840

packages/cli/src/tui/hooks/useAppState.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ function initState(): AppState {
297297
projects,
298298
selectedIndex: 0,
299299
focusPane: 'projects',
300-
mode: demoIsNewUser() || projects.length === 0 ? 'welcome' : 'normal',
300+
mode: 'normal',
301301
filterText: '',
302302
promptText: '',
303303
scrollOffset: 0,
@@ -324,7 +324,7 @@ function initState(): AppState {
324324
projects: initialProjects,
325325
selectedIndex: 0,
326326
focusPane: 'projects',
327-
mode: isNew && initialProjects.length === 0 ? 'welcome' : 'normal',
327+
mode: 'normal',
328328
filterText: '',
329329
promptText: '',
330330
scrollOffset: 0,

0 commit comments

Comments
 (0)