mirror of
https://github.com/firstsun-dev/git-files-sync.git
synced 2026-07-22 17:20:30 +00:00
Records this session's completed work (#33, #36, #31, #39 consolidated onto PR #51 alongside the prior session's #40/#41/#42/#48) and the paused state of feat-009 (#38 i18n), which is blocked on a scope decision from the user before any code is written.
5.9 KiB
5.9 KiB
Session Handoff
Current Objective
- Goal: Work through open issues one at a time, all consolidated into a single PR (user explicitly asked for fewer PRs, not one per issue).
- Current status: 6 issues done and pushed (#33, #36, #31, #39, plus #40/#41/#42/#48 from an earlier session), all on one branch/PR. Issue #38 (i18n) was scoped but paused before any code was written — waiting on the user's answer to a scope question.
- Branch / commit:
claude/fix-directory-symlink-pull-260713@4eebebc→ PR #51 (open, all CI checks green as of last check)
Completed This Session
- #31 -
fix: surface a clear error when requestUrl() itself rejects with HTML content— some Obsidian versions eagerly JSON-parse insiderequestUrl(), so a login/proxy HTML page rejected the whole call with a rawSyntaxError, bypassing the existingparseJson()HTML-detection wrapper. Added the same detection tosafeRequest's outer catch. - #33 -
fix: symlinked directories no longer break pull discovery— a directory symlink is a single git blob, not a real tree; local scanning recursed into it as if it were, causing bogus remote.gitignore404s and a permanently-stuck "remote only" status. Also fixedcreateLocalSymlink's missing WindowssymlinkSynctype hint. - #36 -
perf(refresh): use tree blob SHAs to avoid per-file content fetches— refresh now compares a locally-computed git blob SHA against each tree entry's SHA instead of onegetFilenetwork call per file; diff content is fetched on demand via a newgetBlob(sha, path)per service. Symlink-aware hashing (real/follow/skip modes) per the issue's follow-up design. - #39 -
feat: show new feature tips after update— newsrc/changelog.ts(hand-curated, separate from the auto-generatedCHANGELOG.md) with anotableflag per entry, aWhatsNewModal, and alastSeenVersionsetting so the tip shows once per upgrade only. - Consolidated everything (this session's 4 issues + the prior session's #40/#41/#42/#48) onto one branch/PR (#51) per the user's explicit request to reduce PR count — closed/merged the now-redundant PRs #49/#50/#52/#53.
- #38 (i18n) - paused, not started. Counted scope (~47 strings in
settings.ts, ~24 inSyncStatusView.ts, 37Notice()call sites across 4 files) and asked the user how deep to scope it; the question prompt was dismissed without an answer before they ran/firstsun-harness. Nosrc/i18n/*files exist yet — don't assume a design, ask again first.
Verification Evidence
| Check | Command | Result | Notes |
|---|---|---|---|
| Lint | npx eslint . |
0 errors | Repo-wide, no exceptions |
| Type check + compat | npm run build |
Pass | Includes typecheck-compat.mjs against Obsidian 1.11.0 |
| Tests | npx vitest run |
302/302 passed | 22 test files |
| Duplication | npx jscpd --min-lines 5 --min-tokens 50 src |
14 clones, all pre-existing | Checked after every commit — SonarCloud's gate is 3% on new code, learned this the hard way earlier (PR #49 failed at 8.3%) |
| Manual (in Obsidian) | — | Not done | No Obsidian instance available in this environment |
Files Changed (this session, cumulative across the 4 issues)
src/services/git-service-base.ts,git-service-interface.ts,github-service.ts,gitlab-service.ts,gitea-service.ts— tree-entrysha,getBlob(), HTML-error detection insafeRequestsrc/logic/gitignore-manager.ts,src/ui/SyncStatusView.ts— symlink-directory recursion guard, SHA-based status refresh, lazy diff loadingsrc/utils/symlink.ts— WindowssymlinkSynctype hintsrc/utils/git-blob-sha.ts,src/utils/version.ts(new) — SHA-1 blob hashing, numeric version comparesrc/changelog.ts,src/ui/WhatsNewModal.ts(new) — what's-new modal + datasrc/ui/components/DiffPanel.ts,FileListItem.ts— on-demand diff fetchsrc/settings.ts,src/main.ts—lastSeenVersionfield, update-check wiring- Corresponding test files under
tests/for all of the above (302 tests total)
Decisions Made
- One PR, not one-per-issue: user said "不要那麼多pr merge" (don't want so many PRs). All further issue work goes directly onto
claude/fix-directory-symlink-pull-260713— do not create a new branch/PR for the next issue. src/changelog.tsis hand-curated, separate fromCHANGELOG.md: the auto-generated changelog (via semantic-release) isn't shipped in release assets and is too commit-log-granular for an end-user popup anyway.- Deduped two accidental code-duplication regressions mid-session (test mocks,
getBlobbodies) before they could trip SonarCloud's new-code gate again.
Blockers / Risks
- #38 (i18n) needs a scope answer from the user before any code is written. Options put to them: (a) build the i18n mechanism + fully migrate
settings.tsonly, Notices later; (b) fully migrate settings.ts and all 37 Notice call sites now; (c) build just thet()/detection/fallback mechanism with a couple of sample keys, defer actual string migration. Don't guess — the wrong choice means redoing a large diff. - PR #51 is now fairly large (6 issues). Consider flagging to the user that it may be worth reviewing/merging before more commits pile on.
Next Session Startup
- Read
CLAUDE.md,feature_list.json,progress.md, then this file. - Run
./init.shbefore editing. - Ask the user for #38's scope decision (see "Blockers / Risks") before touching any i18n code.
- All new commits go on
claude/fix-directory-symlink-pull-260713(PR #51) unless told otherwise.
Recommended Next Step
- Get the #38 scope decision, implement it, then move to #37 (Bitbucket provider) per the previously agreed order (39→38→37, all done).