Commit ef86735
authored
fix(agent): preserve uploads during app bootstrap (#80)
## Summary
- preserves `/uploads` when the first template workspace is scaffolded
- recognizes both `src/app` and `app` Expo Router layouts so valid
projects are restored
- reuses an existing pnpm installation and only installs when
`node_modules/.pnpm` is missing
## Context
Direct production QA showed a successful upload and visible composer
chip, followed by an app-builder run that deleted the uploaded file and
performed a redundant dependency install. The install then failed before
the model could read the file.
## Decisions
| Decision | Choice | Reasoning |
|---|---|---|
| Upload persistence | Exclude `uploads` from first-run template cleanup
| The project volume and R2 file record remain authoritative across
chats |
| Workspace detection | Accept `src/app` and `app` | Both supported
template layouts are valid and must not trigger destructive bootstrap |
| Dependency restore | Install only when the pnpm virtual store is
absent | Persistent project workspaces should not reinstall on every
prompt |
## Edge cases
- first prompt uploads survive template scaffolding
- existing Expo projects using either Router layout avoid destructive
reset
- missing dependency stores still take the existing install/recovery
path
- imported repository reset behavior is unchanged
## Verification
- [x] `pnpm turbo typecheck lint build` — 76/76 tasks passed
- [x] production migration verifier already passes against the single
migration file
- [ ] repeat direct production upload, later-reference, and agent-read
QA after deploy
No Linear issue or plan document is associated with this production QA
fix.1 parent 50cd06c commit ef86735
2 files changed
Lines changed: 59 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
Lines changed: 54 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
| 163 | + | |
168 | 164 | | |
169 | 165 | | |
170 | 166 | | |
| |||
200 | 196 | | |
201 | 197 | | |
202 | 198 | | |
203 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
204 | 202 | | |
205 | 203 | | |
206 | 204 | | |
207 | 205 | | |
208 | 206 | | |
209 | | - | |
| 207 | + | |
210 | 208 | | |
211 | 209 | | |
212 | 210 | | |
| |||
583 | 581 | | |
584 | 582 | | |
585 | 583 | | |
586 | | - | |
587 | 584 | | |
588 | | - | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
589 | 603 | | |
590 | 604 | | |
591 | | - | |
| 605 | + | |
592 | 606 | | |
593 | 607 | | |
594 | 608 | | |
| |||
604 | 618 | | |
605 | 619 | | |
606 | 620 | | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
607 | 651 | | |
608 | 652 | | |
609 | 653 | | |
| |||
0 commit comments