Work as a senior product engineer and finish the application in this specification. This is a real application, not a mockup. Create the complete source tree, configuration, migrations or schemas, working UI, persistence, error handling, and tests. Do not leave stub handlers, simulated production data, TODO features, inert buttons, or invented successful test results.
Start by inspecting the workspace and available tools. Choose compatible maintained dependency versions and pin them in a lockfile. Write a short implementation plan and an acceptance checklist, then implement and run the work without stopping after planning. Use stages to manage complexity, but carry every required stage to completion. If context runs low, save progress and remaining acceptance checks in a local handoff document and resume from it. Ask only about decisions that cannot safely be inferred.
Keep modules small and put domain logic outside presentation components. Validate inputs at trust boundaries, handle cancellation and failures, preserve user data, and provide clear recovery actions. Include keyboard access, labelled controls, visible focus, useful empty/loading/error states, sensible contrast, and reduced-motion support. No advertising, subscriptions, analytics, hidden cloud dependencies, or remote executable loading.
Before finishing, run the compiler/type checker, linting, unit/integration tests, and a production build. Add real workflow tests for the acceptance checklist and run them against the built application where possible. Fix failures and repeat affected checks. Report exact commands, actual results, any environment-blocked checks, setup instructions, and remaining limitations. Never call an unfinished or untested feature complete. Include a README explaining architecture, development, packaging, data locations, permissions, and recovery. Use clean generated sample data only in explicit tests and previews.
Build {{app_name}}, a desktop file explorer inspired by Rocket Explorer. Use Electron/Chromium with a sandboxed React and strict TypeScript renderer, a Rust sidecar for trusted filesystem work, and a small typed IPC contract. Use a warm purple creator workspace, colourful folder icons, a location sidebar, breadcrumb/address row, virtualized grid/list and optional inspector; use {{accent_colour}} for the accent. Real filesystem data is mandatory. A browser-only launch should show that the native bridge is unavailable rather than fabricate folders.
Core browsing: discover home/standard XDG or platform folders, drives/mounts and operating-system Trash. Implement tabs, back/forward/up history, breadcrumbs, split panes, hidden files, natural sorting, filters, keyboard navigation, multi-selection and drag-and-drop. Read large directories in incremental pages with viewport virtualization. Cancel stale searches/listings and coalesce filesystem watcher events. Handle permission-denied, disconnected drives, symlinks/broken links and files disappearing during operations.
File operations: create, rename, duplicate, copy/cut/paste, move, drag transfer and OS Trash. Validate paths and child names in Rust, never trust webview input, and return structured errors. Never silently overwrite: merge existing directories and skip existing destination files for transfers; provide explicit conflict feedback and optional keep-both naming. Use a serial operation queue with progress, cancellation and a bounded recovery/undo journal. Cross-volume move must complete and validate the copy before placing the source in OS Trash. Confirm deletion counts. Do not replace recoverable deletion with permanent unlink. Restoring undo must not overwrite later user edits.
Previews: lazy, size-bounded image/GIF/video thumbnails and an inspector for images, video/audio, text/source/Markdown and PDF. Treat Markdown/text as untrusted; never execute scripts or load arbitrary remote content. Run expensive thumbnail, search, preview and Git work off the UI thread. Show unsupported formats honestly and offer the system application; do not fake a 3D renderer. Detect useful project roots such as Git, Blender, Rust, Node and Python, and query Git only for a requested project.
Local settings: tags, starred paths, folder appearance, workspaces, tab layout and smart collection predicates persist in a versioned local store. Build command-palette actions, native file opening and Open Terminal Here using platform adapters with argument arrays rather than shell interpolation. Invalid paths are recoverable UI states. Prevent untrusted renderer navigation and arbitrary sidecar command invocation.
Linux integration stage: discover connected Android devices through GIO/MTP if available and expose explicit copy operations. Missing providers must show unavailable. Device transfers always copy and preserve computer originals. Put optional default-file-manager and file-chooser portal integration in a separate opt-in installer with backup, verification and uninstall/restore instructions; never change system defaults automatically. Implement and test the native FileManager1/Open/Save contracts if this stage is enabled.
Plugins and AI are optional extension seams: disabled by default, no permissions without grants, scoped roots/capabilities, and preview/confirm/apply/undo separation. Do not invent cloud connectivity, indexing, duplicate analysis or native 3D tools. Those features are not part of this build.
Acceptance: browse a temporary directory with thousands of files smoothly; navigate tabs/history and split panes; copy a nested tree with conflicts; cancel a transfer; recover a cross-volume move; Trash and undo without overwrite; lose drive access gracefully; reject path traversal and shell metacharacter injection; preview untrusted Markdown safely; restart and restore local settings. Rust tests must use temporary fixtures, never the user's real files. Run renderer workflow tests, Rust operation tests and a packaged desktop smoke test. Provide reproducible npm development/build/check scripts and cargo tests for the sidecar.
Paste this into your preferred AI assistant. Review its output before running it.