You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closes the loop for the "no IDE recents, no git config hints, repo at
some arbitrary path" case. Instead of dropping the user on a blank
"Scanning…" screen, the panel becomes a first-class drop target. Once
at least one repo is known, the same flow lives as a subtle footer
hint that doesn't fight for real estate with the timeline.
Backend:
* discovery_orchestrator::add_repo_explicit — validates with
Repository::discover (so dropping a subdirectory of a repo also
works), upserts with primary_source='manual', confidence=100, and
promotes user_state to 'pinned' so the row survives at the top of
paint order. Removes the path from discovery_tombstones if it was
previously hidden — the user is explicitly asking for it back.
Learns parent + grandparent roots (the same logic the prewarm
task uses) so siblings get found on the next scan. Emits
`timeline://repo-discovered` so the existing listener appends the
row immediately.
* commands::explicit_add_repo — Tauri command wrapping the above;
validation failure surfaces as "Not a Git working tree" to the
frontend instead of a stack trace.
Frontend:
* Tauri `tauri://drag-drop` listener at window level — accepts every
path in a multi-file drop and tries to add each one. Lives next to
the existing window pointer-down drag handler.
* Document-level `paste` listener with two guards: target must NOT be
an input/textarea/contenteditable (so chip search inputs keep
working), AND the clipboard text must look like a path (drive
letter, leading /, or leading ~). Anything else is ignored —
paste of random text never accidentally tries to add a repo.
* `addError` state shows the backend's error string ("Not a Git
working tree" etc) inline. Auto-clears after 4s so a one-off typo
doesn't linger.
* `EmptyDropPanel` component for the cold-start state: big dashed
drop target, paste hint, scanning indicator only when relevant.
* `.panel-footer-hint` strip for the warm state — small "Drop or
paste a repo folder to add it" text below the timeline. Surfaces
add errors too so the user notices them whether the panel is
empty or full.
Dark-mode CSS for both the empty panel and the footer hint.
Also cleaned up two intentional-dead-code warnings on
`GitConfigHint::RootPattern` and `DiscoverySource::{GitConfigIncludeIf,
Watcher}` — collected for Phase 2 expansion, not used yet, marked with
`#[allow(dead_code)]` and a comment explaining why.
Rust tests 34/34, TS type-check clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments