Commit Graph

15 Commits

Author SHA1 Message Date
altair823
54e2f5b10f chore(release): v0.2.6 — bugs + cleanup (16 backlog 항목 처리)
bugs (4):
- #10 restoreNote 가 failed 노트 시 pending_jobs 재생성
- #12 trashCount cap → countTrashed() 정확 N (이미 fix 됨, tests 추가)
- #45 autostart 풀림 — args 비교 정확도 + 진단 로그
- #46 hidden-start race — additionalData 로 두 번째 hidden 구분

cleanup (12 → 9 cluster):
- #3+#19+#34 KST helper 통합 → src/shared/util/kstDate.ts (4 callsite migrate)
- #4+#23+#26+#27 TrayCallbacks 객체화 + state 통합 (10 positional → 1-arg + Partial<TrayState>)
- #5 AiFailedReason union 단일 export (zod z.infer)
- #21 hasNoteId type predicate (TelemetryService.test.ts narrowing 단축)
- #22 NoteRepository hydrate row type 통일 (as Record<string, unknown>[])
- #24+#41 Banner shared component (severity prop, 4 banner migrate)
- #8 stats.md exhaustiveness check (else { _: never })
- #15 IPC channel inbox:delete → inbox:trash
- #29 VOCAB_TOP_N const
- #42 Modal client-side URL pre-check (zod safeParse)
- #9 휴지통 회수율 ratio 의미 코멘트

게이트: typecheck 0 / 단위 424 / e2e 1
잔여 backlog: 14건 (telemetry data-dependent, v0.2.7 brainstorm)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 01:46:25 +09:00
altair823
7187aea0a9 hotfix(critical): single-instance lock — multi-process SQLite race 방지
dogfood 발견 — 앱 아이콘 클릭 시마다 새 process 가 떠서 트레이 아이콘 여러 개,
SQLite 동시 접근 + AiWorker 중복 처리 + HealthChecker 중복 polling 등
**데이터 corruption 위험**.

원인: app.requestSingleInstanceLock() 호출 부재. Electron default 가
multi-instance 라 .exe 실행마다 별도 process.

Fix:
- app.requestSingleInstanceLock() 첫 줄에서 호출
- 두 번째 인스턴스 → app.quit() 즉시 종료
- 'second-instance' 이벤트 → 기존 inbox 창 restore + show + focus
  (사용자 의도는 "앱 보기" 라 가정)

게이트: typecheck 0 / 단위 413 / e2e 1
version: 0.2.4 → 0.2.5 (critical hotfix patch)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 00:42:50 +09:00
altair823
298d1c6182 chore(release): v0.2.4 — patch cut (backlog 5건 처리 + dogfood unblock)
PR #21 머지 후 v0.2.3.1 binary 빌드 시도 → electron-builder semver 검증
실패 (4-part X.Y.Z.W 비호환). v0.2.4 minor bump 으로 우회.

본 cut 동봉:
- 0.2.3.1 의 in-app Ollama 설정 UI (PR #21 fee982a)
- backlog #2 (DAY_MS 상수)
- backlog #6 (media.gc .catch)
- backlog #13 (NoteCard onDeleted optional)
- backlog #44 (버전 정보 트레이 메뉴)
- backlog #1 stale 표기 (PR #13 시 이미 fix)

게이트: typecheck 0 / 단위 413 / e2e 1
다음: PR + 머지 후 binary 빌드 v0.2.4 + Gitea release
v0.2.5 brainstorm 트리거 시 잔여 backlog 39건 일괄 triage

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 00:15:51 +09:00
altair823
3a2ff1a35c chore(release): v0.2.3.1 — Ollama 설정 in-app UI (patch cut)
dogfood unblock 패치. v0.2.3 의 INKLING_OLLAMA_ENDPOINT env var 의존 →
in-app UI (트레이 + 배너) 에서 endpoint + model 변경 가능.

게이트: typecheck 0 / 단위 413 / e2e 1
다음: PR + 머지 후 binary 재빌드 + Gitea release v0.2.3.1

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 23:44:45 +09:00
altair823
5fc694c57b hotfix(build): publish: null 추가 — Mac 빌드 시 updateInfoBuilder crash 회피
PR #20 직후 Mac arm64 dist 시도 중 발견:
- Cannot detect repository by .git/config 경고 (3회)
- ⨯ Cannot read properties of null (reading 'channel')
  at computeChannelNames (updateInfoBuilder.ts:47:74)

원인: electron-builder 가 auto-update 메타파일 (latest-mac.yml) 생성 시
publish config 또는 git remote 에서 채널 정보 추론 실패 → null 접근 crash.
DMG 자체는 빌드 성공 (dist/Inkling-0.2.3-arm64.dmg) — 후처리 단계 crash.

Fix: build.publish = null 명시 — auto-update 메커니즘 미사용 (개인 dogfood)
이라 latest-mac.yml / latest.yml 생성 단계 skip. Windows 빌드도 동일 경고
3회 떴는데 이번 fix 로 함께 사라짐.

검증: npm run dist:dir on Windows → "Cannot detect repository" 경고 사라짐, 정상 빌드.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 16:15:47 +09:00
altair823
8cdffb2143 hotfix(build): npm run dist 가 Mac arm64 에서도 동작하도록 cross-platform
- dist / dist:dir 에서 --win --x64 제거 → electron-builder host-default
  (Windows 에선 win-x64, Mac 에선 mac-arm64 자동 선택)
- 명시적 강제 variant 추가: dist:win, dist:mac
- build.mac 블록 추가:
  - target: dmg / arch: arm64
  - category: productivity
  - identity: null (개인 dogfood, codesign skip)

검증:
- typecheck 0
- 단위 403/403
- npm run dist:dir on Windows: platform=win32 arch=x64 (회귀 X)

Mac arm64 빌드 시 첫 실행 시 "Apple 이 검증할 수 없음" 경고 → 우클릭 → 열기 (codesign 미적용 의도).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 16:04:20 +09:00
altair823
5d0f87c5fb chore(release): v0.2.3 — package.json + lock 버전 bump
v0.2.3 cut 7/7 완료 (PR #13/#14/#15/#16/#17/#18/#19) 후 binary 빌드.

빌드 결과: dist/Inkling Setup 0.2.3.exe (103.8MB, NSIS x64)
gates: typecheck 0 / 단위 403 / e2e 1

다음: dogfood 머신 핸드오프 → ≥1주 soak → telemetry export → v0.2.4 brainstorm

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 14:03:41 +09:00
altair823
06cfa1c151 chore(release): v0.2.2 — F7 + Quick Capture 스크롤 fix
- F7 (이미 main 병합): AI-primary due_date flow, 다중 후보 추출
- fix(quickcapture): textarea min-height: 0 + .card overflow: hidden 으로 hint 노출 보장

CHANGELOG.md / package.json 0.2.1 → 0.2.2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 23:25:53 +09:00
altair823
a38b6fdeea chore(release): bump version to 0.2.1 + CHANGELOG
8 항목 dogfood-feedback 로드맵 (F1·F2·F3·F4-E·F5·F6-L1·F6-L2·F6-L3·F4-C·F)
한 번에 흡수. migration v2 (due_date) + pre-migration snapshot.
단위 테스트 52 → 197. 신규 npm dep 0, 시스템 dep 추가는 git CLI (이미 사전 요구).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 11:55:44 +09:00
altair823
2d90a48621 feat(copy): replace '기억 구출' framing with 표면별 자연 동사 + Zeigarnik priming
F3: '구출' (rescue) is unnatural everyday Korean. Replace per-surface:
  - 트레이 '구출한 메모 보기' → '보관한 메모 보기'
  - 트레이 '기억 구출하기' → '한 줄 적기'
  - 토스트 #2 → '머릿속에서 꺼내 두었습니다.'
  - 토스트 #3 → '방금 한 줄 잡아뒀습니다.'
  - QC 힌트 'Ctrl+Enter 구출' → 'Ctrl+Enter 저장'
  - package.json description → 'local-first 한 줄 보관 도구'

F4-E (Zeigarnik priming): empty state copy reframed to evoke the
"unfinished thought tugging at memory" → "외재화로 해소" loop:
  - '첫 기억을 구출해보세요.' → '머릿속에 떠다니는 한 줄을 적어보세요.'

E2E smoke assertion updated to match. Slice §1.1 invariant 5
('실패/끊김/연속 실패' 금지) preserved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 11:29:31 +09:00
altair823
62a13ebf9f feat(packaging): add electron-builder NSIS installer + Windows autostart
- electron-builder 26.8.1 (devDep, exact pin) with NSIS x64 target
- moved electron 41.3.0 to devDependencies (electron-builder requirement)
- new scripts: dist, dist:dir, predist runs rebuild:electron + build
- main: detect --hidden arg, skip inbox window on hidden launch
- main: first-run autostart enable on packaged Windows (.autostart-init flag)
- tray: 'Windows 시작 시 자동 실행' checkbox (packaged only)
- README: packaging section + Dev Mode requirement

Build verified: dist/Inkling Setup 0.2.0.exe (100MB), dist/win-unpacked/
runs better-sqlite3 native module from app.asar.unpacked.

Note: requires Windows Developer Mode ON (winCodeSign cache extraction
contains darwin symlinks that need SeCreateSymbolicLinkPrivilege).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 23:45:56 +09:00
altair823
be24458450 chore(deps): bump uuid to ^14.0.0
v4/v7 imports stay API-compatible — typecheck and unit suite (52/52)
both pass against the new resolution. The caret range deviates from
the slice's strict-pin invariant (spec §7.1); revisit if reproducible
builds become an issue.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 17:33:32 +09:00
altair823
c7e9463adb fix(e2e): rebuild better-sqlite3 per ABI + select inbox window by title
- Vitest needs the node-ABI prebuilt sqlite binary; Electron 41 needs ABI 145.
  Add `rebuild:node` / `rebuild:electron` scripts and wire them as
  pre-hooks for `test`, `test:e2e`, `start`, `dev`, `test:integration`.
- Smoke test was racing on `firstWindow()`, which non-deterministically
  returned the quickcapture window. Strip ELECTRON_RUN_AS_NODE from the
  launch env, wait for both windows to register, then pick the inbox by
  title and assert the heading via `getByRole`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 16:05:15 +09:00
altair823
7b129fec9f chore(build): switch main+preload to CJS for Electron 41 module hook
Two related runtime defects surfaced when first attempting
`npm run build` + Electron launch:

1. Renderer html files referenced `/src/.../main.tsx`, which
   vite dev resolves but vite production rollup cannot. Changed
   both inbox and quickcapture to `./main.tsx` (sibling-relative).

2. Electron 41's main-process module hook only injects the
   real `electron` API into `require('electron')` calls inside
   CommonJS modules. With package.json `"type": "module"` set,
   electron-vite emitted ESM bundles that did
   `import { app } from "electron"`; Node's ESM CJS-interop
   then loaded the on-disk index.js (which exports the binary
   path string) instead, leaving `app` undefined at startup.

Fix: drop `"type": "module"` so electron-vite emits CJS for
main + preload (renderer is unaffected — vite handles its own
ESM transform regardless). Source files keep modern import
syntax via the default-import + destructure pattern
(`import electron from 'electron'; const { app } = electron;`)
which transpiles correctly to `const { app } = require('electron')`
in the CJS output.

Also updated `electron-log/main` -> `electron-log/main.js`
because Node ESM strict resolution requires the `.js` extension
even though the package's CJS entry serves both.

Verification: `npm run build` produces 47-module renderer +
1005KB main bundle without errors. `npm run typecheck` clean.
Unit suite (52 tests) unaffected.

Plan deviation log: Task 4 (logger), Task 30 (main wiring), and
Tasks 17/18/22/30 referencing electron imports landed with named
imports per plan; this commit refactors them to default+destructure
without changing semantics.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 12:32:21 +09:00
altair823
5abec8e7d9 chore: bootstrap inkling project (Task 1)
Adds package.json, tsconfig.json, tsconfig.node.json,
electron.vite.config.ts, vitest.config.ts, .gitignore, and
package-lock.json. Verified Node 24.15.0 + npm 11.12.1 via Volta.
better-sqlite3 12.9.0 native build succeeded against VS 2022 +
Python 3.12.

Plan v0.4 had two install pin issues; adjusted live and logged
in plan Task 1 Step 2:
- electron-vite@2.3.0 + vite@6.0.3 ERESOLVE (peer ^4||^5).
  Promoted build-tool chain: electron-vite 5.0.0, vite 7.3.2,
  @vitejs/plugin-react 5.1.4 (vite@7 is the compatible overlap;
  vitest@4.1.5 also accepts vite@7).
- @types/uuid@11.0.0 deprecated stub (uuid@11 ships own types);
  removed from devDependencies.

Other deps installed at the planned exact pins. Step 8 sanity:
TypeScript 6.0.3, Vitest 4.1.5, Electron 41.3.0 (npm ls).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 11:52:57 +09:00