# Import Destination Inline Implementation Plan
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
**Goal:** Move album destination selection from a dialog into an inline card on the import-shared screen, between the album details card and the gallery card.
**Architecture:** All changes are in a single file (`src/pages/assets/import-shared.tsx`). Remove `importAllDialogOpen` state and its Dialog component. Add a Destination card rendered inline when `sharedData && albumDetails`. The import button in the header calls `handleImportAll` directly. No backend changes needed.
**Tech Stack:** React, Next.js, shadcn/ui (Card, Button, Input, Select, Label)
---
### Task 1: Remove dialog state, update fetch trigger, wire import button directly
**Files:**
- Modify: `src/pages/assets/import-shared.tsx`
All changes are in one file. Read it fully before starting.
**Step 1: Remove `importAllDialogOpen` state**
Delete this line (~line 162):
```typescript
const [importAllDialogOpen, setImportAllDialogOpen] = useState(false);
```
**Step 2: Update the albums fetch effect**
The current effect fetches albums when the dialog opens. Change it to fetch when `sharedData` loads instead:
```typescript
// BEFORE
useEffect(() => {
if (importAllDialogOpen) {
listAlbums().then(setExistingAlbums).catch(console.error);
}
}, [importAllDialogOpen]);
// AFTER
useEffect(() => {
if (sharedData) {
listAlbums().then(setExistingAlbums).catch(console.error);
}
}, [sharedData]);
```
**Step 3: Update the Back button handler**
Remove `setImportAllDialogOpen(false)` from the Back button's onClick (it's one of the reset lines in the Header `leftComponent`).
**Step 4: Update the import button in the Header rightComponent**
Replace the current onClick (which opens the dialog) with a direct `handleImportAll` call:
```tsx
```
Also remove the `setAlbumImportMode("album")` reset that was in the old onClick — the inline card owns the mode state now.
**Step 5: Commit**
```bash
git add src/pages/assets/import-shared.tsx
git commit -m "refactor: wire import button directly to handleImportAll, fetch albums on sharedData load"
```
---
### Task 2: Add inline Destination card
**Files:**
- Modify: `src/pages/assets/import-shared.tsx`
**Step 1: Find the insertion point**
In the JSX return, inside the `` element, there is:
- An album details `` rendered when `sharedData` is set
- A gallery `` rendered when `sharedData && albumDetails`
Insert the Destination card between them — after the album details card, before the gallery card. It should only render when `sharedData && albumDetails` (same condition as the gallery).
**Step 2: Add the Destination card**
```tsx
{sharedData && albumDetails && (
Destination
Choose where to save the imported assets in your Immich library.
)}
)}
```
**Step 3: Commit**
```bash
git add src/pages/assets/import-shared.tsx
git commit -m "feat: add inline destination card for album selection on import-shared screen"
```
---
### Task 3: Remove the import Dialog
**Files:**
- Modify: `src/pages/assets/import-shared.tsx`
The import Dialog (open/close controlled by `importAllDialogOpen`) now needs to be removed. The video and image preview Dialogs must be kept — do not touch those.
**Step 1: Remove the import Dialog JSX**
Delete the entire Dialog block that starts with:
```tsx
```
It ends just before the video preview Dialog (`