# Complete a linked Drive handoff offline

AC018 v1. Save `drive-linked-handoff-offline.html` and open it in a modern browser with JavaScript enabled. The single HTML file contains all code and styles; it works without a connection after saving. No packages, login, Google access or installation are required.

1. Add your project and recipient/team names, then enter one promised filename per line. The file starts with blank own-input fields.
2. Paste the linked file list: filename, a tab, then its supported HTTPS Drive/Docs file URL on each line, without a header. Or load a local UTF-8 CSV with exactly `filename,url` headers. CSV imports replace only the linked list; enter promised filenames separately.
3. Create the file handoff. Resolve missing, unexpected or duplicate names, repeated file IDs and invalid URLs. Names match exactly after trimming spaces and retain case. Folder links are rejected; no partial handoff is produced on failure.
4. Check intended file contents and versions in your normal Drive workflow, and verify the recipient can open every file. Copy the resulting plain-text handoff into your existing document or email editor, or save it as TXT. If clipboard access is unavailable, the handoff is selected for your device's copy command.

The fictional example uses unavailable format-example URLs. Edits and CSV imports after loading the example remain sample use until **Start with my own files / reset** clears every field and switches to own-input mode. Example downloads are named `drive-handoff-fictional-example.txt`; own-input downloads are named `drive-file-handoff.txt`.

## Bounds and local privacy

Expected and linked lists allow up to 500 lines and 100,000 characters each. Project and recipient labels allow up to 200 characters, without braces, tabs, line breaks or controls. Complete handoff text is limited to 100,000 characters.

CSV files allow at most 100,000 bytes, 100,000 characters and 500 total records: a header plus up to 499 file rows. UTF-8 BOM, quoted commas/quotes and CRLF are supported. Every data row needs exactly a nonempty filename and URL. Cells must stay on one line, without tabs or controls. An invalid import clears the old linked list and handoff. Resetting, editing an input, creating a handoff or starting a newer import prevents delayed file reads from overwriting the current input.

The HTML reads only the local CSV file you select. It uses no remote dependencies, uploads, analytics, browser storage, Google connection, file contents, permission changes or message sends. Names and URL shape are checked locally; access, file existence and versions are not established. Text stays literal; there is no formula or HTML evaluation. Inputs and results remain in the open page until reset or closing. Copying or downloading creates your own local copy containing filenames, project/recipient labels and possibly private links; protect those copies.

Use a modern browser with `File.text()`, Blob downloads and ES2022 support. Clipboard support and local-file browser policy vary. Manual pasted linked rows and selection/copy remain available. Compare with your normal manual link-list review; no time advantage, independent completion or customer demand is established by saving this file or running its fictional example.

## Source and local verification

Generated from unchanged `site/lib/drive-linked-handoff.ts` and `site/lib/drive-linked-handoff-csv.ts`, with their existing filename, URL and CSV validators. The draft text equals the browser core output. The saved HTML has a content security policy blocking network connections and form submission.

From the repository root, with the existing `site/node_modules` installed:

```sh
node scripts/build-offline-drive-handoff.mjs
node scripts/build-offline-drive-handoff.mjs --check
node --test scripts/build-offline-drive-handoff.test.mjs
```

The regressions execute the actual inline script with browser interfaces simulated locally, compare output with the existing downloadable core and independently execute the CSV adapter. They cover validation, import bounds, stale read fencing, sample/own modes, literal text, clipboard fallback and exact TXT contents. They do not establish real browser rendering, recipient access, Google execution or message delivery.

## License

MIT License

Copyright (c) 2026 QuasiLife

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
