Stage imports before committing - #571
Open
gschier wants to merge 8 commits into
Open
Conversation
gschier
marked this pull request as ready for review
August 17, 2026 05:30
Greptile SummaryThe PR separates imports into a non-mutating planning stage and an atomic commit stage, allowing users to preview resources and select a destination before persistence.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported dismissal race is addressed by blocking implicit dialog closure and disabling explicit cancellation while an import operation is active.
|
| Filename | Overview |
|---|---|
| apps/yaak-client/lib/importData.tsx | Coordinates planning, explicit cancellation, commit, completion reporting, and navigation; the previous dismissal race is fixed by making the import dialog non-dismissible. |
| apps/yaak-client/components/ImportDataDialog.tsx | Adds destination selection, import previews, warnings, resource counts, and loading-state guards that disable cancellation during active operations. |
| apps/yaak-client/components/core/Dialog.tsx | Introduces a unified close-disable option covering backdrop clicks, Escape, and the built-in close button. |
| crates/yaak/src/import.rs | Implements destination-aware import planning, resource remapping, collision handling, and atomic commit behavior. |
| crates-tauri/yaak-app-client/src/import.rs | Exposes separate planning and commit operations through the native application boundary. |
| crates-cli/yaak-cli/src/commands/import_export.rs | Migrates CLI imports to the same destination-aware plan-and-commit pipeline. |
| crates/yaak-plugins/src/manager.rs | Carries detected importer metadata alongside normalized plugin resources. |
Sequence Diagram
sequenceDiagram
participant U as User
participant UI as Import dialog
participant RPC as Import RPC
participant P as Importer plugin
participant DB as Model database
U->>UI: Select source and destination
UI->>RPC: Plan import
RPC->>P: Parse source
P-->>RPC: Importer metadata and resources
RPC-->>UI: Preview plan and warnings
U->>UI: Confirm import
UI->>RPC: Commit plan
RPC->>DB: Atomic resource upsert
DB-->>RPC: Imported resources
RPC-->>UI: Import result
Reviews (5): Last reviewed commit: "Use model labels in import preview" | Re-trigger Greptile
greptile-apps
Bot
dismissed
their stale review
August 17, 2026 15:33
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stages parsed imports as a previewable plan before atomically committing them. Users can import into a new or current workspace while preserving destination configuration and handling environment collisions safely.
Feedback: https://feedback.yaak.app/p/update-current-workspace-during-import