Skip to content

feat(sync): add automatic sync and refine mobile Source Control density - #156

Open
ClaudiaFang wants to merge 10 commits into
mainfrom
claude/mobile-source-control-density
Open

ClaudiaFang wants to merge 10 commits into
mainfrom
claude/mobile-source-control-density

Conversation

@ClaudiaFang

@ClaudiaFang ClaudiaFang commented Sep 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds Automatic Sync ([FEATURE] Automatic Syncing #141 / feat(sync): add automatic scheduled sync #159) on a configurable interval, with optional startup sync. It reuses the existing Source Control execution path and skips conflicts for manual resolution.
  • Refines mobile Source Control density so Sync Queue, Repository List, Repository Tree file rows, and tree folder rows share one compact row-height/padding model.
  • Keeps Repository List rows single-line: long folder paths yield space before filenames, with ellipsis rather than wrap-driven row growth.
  • Normalizes Queue ↔ Repository vertical spacing and preserves the existing normal-flow mobile Sync bar.

Scope: intentionally combined PR

This PR intentionally contains two features and should not be split again:

  1. Mobile Source Control density
  2. Automatic Sync ([FEATURE] Automatic Syncing #141 / feat(sync): add automatic scheduled sync #159)

Automatic Sync follows:

AutomaticSyncScheduler
→ AutomaticSyncService
→ SourceControlActionService
→ SyncIntentExecutor
→ SyncWorkspace
→ sync domain/provider

Automatic Sync safety / review fixes

  • Observable background failures: SyncIntentExecutor returns SyncExecutionOutcome; planning/commit/pull rejections and provider per-file errors reach the diagnostic logger without showing background Notices.
  • Busy tick skips everything: one shared SyncExecutionGuard is held across automatic refresh → execute → refresh. Busy means 0 refreshes, 0 planning, 0 mutations, and no queued automatic backlog.
  • Refresh counts: busy = 0, idle or synced/conflict-only = 1, executed run = 2.
  • Manual fairness: waiting manual work receives the guard before a later automatic tick.
  • Legacy/manual mutation entry points now share the same guard: ribbon push, push/pull-current-file commands, file context-menu push/pull, and Push/Pull All use SourceControlActionService.runManual(). No second lock was introduced.
  • Push/Pull All consistency: user confirmation happens before acquiring the guard, then the authoritative remote tree is re-read inside the guarded transaction before mutation.
  • E2E cleanup hardening: cleanup now tolerates an unset E2E_TEST_BRANCH and a missing clone. Cleanup also returns immediately, with zero network access, when no e2e.env was persisted (provisioning failed before writing run state), so it can no longer repeat or mask the original GitLab provisioning failure.

Verification

Latest reviewed head: 243196ca44c4bae390367ec56848846d1ffbb160

GitHub Actions run: 35573189808

  • Build
  • Lint
  • Unit Test (Node 22)
  • Unit Test (Node 24)
  • 82 unit/integration test files / 1035 tests passed
  • GitHub Provider E2E
  • GitLab Provider E2E — P0-1 through P0-5 passed; P0-2 completed in ~33s
  • Gitea Provider E2E
  • Required Checks
  • Release package job
  • Branch is up to date with main (behind 0 at review)
  • Manual visual verification in a real Obsidian desktop/mobile client — jsdom does not compute styles.css layout

Mobile visual checklist

Before release, manually spot-check:

  • Desktop normal sidebar
  • Desktop narrow sidebar
  • Mobile Tree mode
  • Mobile List mode
  • Long filename / long folder path
  • Diff stat + row menu visibility
  • Queue → Repository spacing
  • Mobile Sync bar placement

Release note

semantic-release owns the 1.7.0 version bump. Do not hand-edit manifest.json, package.json, versions.json, or generated CHANGELOG.md.

🤖 Generated with Claude Code

ClaudiaFang and others added 2 commits September 2, 2026 02:19
…and Tree

Queue rows already set the compact mobile row baseline; List and Tree file
rows, plus tree folder rows, now read the same shared --scv-mobile-row-*
custom properties instead of drifting independently. List mode's folder-path
suffix now yields horizontal space before the filename (disproportionate
flex-shrink) so long paths ellipsis first and the row never wraps to a second
line. Also normalizes the Queue→Repository vertical gap and both sections'
header→first-row padding to the same values.

CSS-only; no changes to SourceControlViewModel, selection semantics, sync
behavior, tree shaping, scroll persistence, or Queue/Repository
responsibilities.
ClaudiaFang and others added 5 commits September 21, 2026 10:19
feat(sync): add automatic scheduled sync
…drop idle refresh

- SyncIntentExecutor returns SyncExecutionOutcome so background runs expose
  planning/commit/pull rejections and provider errors to AutomaticSyncService.onError
- runBackground holds the shared SyncExecutionGuard across refresh -> execute ->
  refresh; a busy tick does no refresh, planning, or mutation and is not queued
- skip the second refresh when there is nothing actionable
- update architecture/progress docs; PR #156 is a combined PR

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…red execution guard

Ribbon/command/context-menu push and pull and Push/Pull All called SyncManager
directly, bypassing SyncExecutionGuard, so they could overlap Automatic Sync.
Add SourceControlActionService.runManual (same single guard, non-reentrant) and
route those entry points through it; Push/Pull All re-read the remote tree inside
the guard. Also make e2e cleanup tolerate an unset E2E_TEST_BRANCH.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ClaudiaFang ClaudiaFang changed the title fix(ui): unify mobile Source Control row density across Queue, List, and Tree feat(sync): add automatic sync and refine mobile Source Control density Sep 21, 2026
ClaudiaFang and others added 3 commits September 21, 2026 07:28
…sisted

cmd_cleanup called load_env_file (-> normalize_env -> GitLab curl) before
checking for a recorded branch, so a provisioning network failure could be
repeated and masked by cleanup. Return early when e2e.env is absent and no
branch is inherited. Refresh stale progress.md / feature_list.json status.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Tracks firstsun-dev/.github#29

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…-migration

chore(ci): migrate actions to Node 24 runtime
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant