Skip to content

Restore last opened file/folder on refresh; fix empty npm publishes - #3

Merged
shawnpatel merged 2 commits into
mainfrom
pebble-talk
Jul 14, 2026
Merged

shawnpatel merged 2 commits into
mainfrom
pebble-talk

Conversation

@shawnpatel

Copy link
Copy Markdown
Member

Summary

  • Hosted app now remembers the last opened file/folder (handle persisted in IndexedDB, since FileSystemHandles can't be JSON-serialized to localStorage) and restores it on page load. Folder restores reselect the same file. If the browser dropped read permission, a "Reopen " button appears since re-granting requires a user gesture; stale handles clear the saved entry. The bundled demo no longer auto-opens over a pending restore.
  • Fixes the broken 0.1.1 npm publish: all three packages shipped without dist/ because a stale tsconfig.tsbuildinfo made tsc -b skip emitting and npm silently drops missing files entries. Each publishable package now has a prepack that force-builds and asserts the output exists, so an empty publish fails loudly. Versions bumped to 0.1.2 (already published and verified working via fresh npx).

Test plan

  • npm run build and npm run check:examples pass
  • npm pack with deleted dist/ + stale tsbuildinfo now rebuilds and produces complete tarballs
  • Packed tarballs installed into a clean project; CLI validate + PDF export work
  • Published 0.1.2 verified: npx -y almond-harness-studio@0.1.2 validate/export work from a cold cache
  • Manual: open a folder in the hosted app, refresh, confirm it restores (or offers Reopen)

Made with Cursor

Hosted app now persists the opened file/folder handle in IndexedDB and
restores it on load, with a reopen button when the browser needs a
permission gesture. Publishable packages get prepack scripts that
force-build and assert dist exists (stale tsbuildinfo let 0.1.1 ship
empty tarballs); all bumped to 0.1.2.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
harness-studio Ready Ready Preview, Comment Jul 14, 2026 5:57am

Request Review

Co-authored-by: Cursor <cursoragent@cursor.com>
@shawnpatel
shawnpatel merged commit 1d2571f into main Jul 14, 2026
3 checks passed
@shawnpatel
shawnpatel deleted the pebble-talk branch July 14, 2026 05:59

This branch was successfully deployed

1 active deployment
Preview — b0d910a5 Deployed Jul 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant