Repository navigation
Debug seed: prepopulate a thoughtspace from a link #5986
Copy link
Copy link
Open
Labels
featureNew feature or requestNew feature or request
Milestone
Description
A debug seed is a link that carries a thoughtspace, and optionally its undo history, so that anyone who opens it starts from the same thoughts. It is meant for reproducing bugs.
Steps to Reproduce
- a
- b
- c
- d
- Set the cursor on
c. - Open Settings.
- Tap "Copy debug seed link", beside "Copy debug log".
- Open the copied link in a private window.
Expected Behavior
In this case
The private window should open with a, b, c and d in the same structure and order, with the cursor on c. The address bar should no longer contain the seed, and localStorage.debugSeed should be 1.
In general
- Creating a seed.
- Settings. A "Copy debug seed link" link should sit with the debug log links in Settings and copy a link that encodes the current thoughtspace as a JSON thought export, together with the cursor.
- Undo slider. While the Undo Slider is open, a debug seed link should also be available there. Its seed additionally carries the undo patches between the start and end handles, and the positions of both handles and of the current step.
- Host. The link should point at the host it was generated on.
- Size. The seed should be compressed to fit as much as possible into the link. If the link would still exceed 8,000 characters, the minimum URI length RFC 9110 recommends every sender and recipient support (§4.1), it should not be copied, and a message should say the thoughtspace or range is too large for a debug seed.
- Opening a seed. The seed should be read from either the query string or the URL hash.
- Allowed. The thoughtspace should be replaced by the seed when it has no visible thoughts in the root, or when
localStorage.debugSeedis already set. Seeding an empty thoughtspace should setlocalStorage.debugSeedto1. - Refused. When the root has visible thoughts and
localStorage.debugSeedis not set, the thoughtspace should be left unchanged and an alert should say that a non-seeded thoughtspace cannot be overwritten by a debug seed, and that all thoughts must be deleted first. - Undo history. A seed with undo patches should open with the Undo Slider open, its handles where the sender's were, and the current step where the sender's was, so the receiver can undo and redo across the same range.
- Reload. Once applied, the seed should be removed from the URL, so reloading keeps whatever the receiver has done since.
- Allowed. The thoughtspace should be replaced by the seed when it has no visible thoughts in the root, or when
- create-issue skill. Whenever an issue has more than one starting thought and Steps to Reproduce, the skill should include a debug seed link for the starting thoughts. The link should point at https://main.emthought.space, never localhost.
Notes
- The guard on opening a seed exists so that a seed link opened on main or production can never overwrite a user's real thoughtspace.
- A separate preview subdomain (e.g. main2) is planned so that seed links do not land on main. Setting it up may need changes in the Vercel dashboard rather than in this repo.
Generated by Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew feature or requestNew feature or request
Activity