Build a Local-First Revision Log for Floor-Plan Experiments

You have three layout drafts, a folder of images, and a prompt you have already edited twice. Which change produced the version you wanted to keep? The missing piece is often a decision log. Saving the output preserves the picture; saving the brief, the change, and the unresolved question preserves the reasoning. This tutorial builds a small browser app for that second job: an append-only revision log using plain HTML, JavaScript, and localStorage. It requires no framework, account, or backend. As a concrete workflow, consider drafting concepts with Floor Plan AI, which describes text-based floor-plan generation on its website. The log below is a separate, manual companion. It does not call that service, assume an API exists, or read its project data. Define the record before building the form Each revision needs five human-written fields: Label: a stable name that also appears in the saved image filename. Brief: the complete prompt or instructions used for this revi

Build a Local-First Revision Log for Floor-Plan Experiments

You have three layout drafts, a folder of images, and a prompt you have already edited twice. Which change produced the version you wanted to keep?

The missing piece is often a decision log. Saving the output preserves the picture; saving the brief, the change, and the unresolved question preserves the reasoning.

This tutorial builds a small browser app for that second job: an append-only revision log using plain HTML, JavaScript, and localStorage. It requires no framework, account, or backend.

As a concrete workflow, consider drafting concepts with Floor Plan AI, which describes text-based floor-plan generation on its website. The log below is a separate, manual companion. It does not call that service, assume an API exists, or read its project data.

Define the record before building the form

Each revision needs five human-written fields:

  • Label: a stable name that also appears in the saved image filename.
  • Brief: the complete prompt or instructions used for this revision.
  • Observation: what changed and what you can actually see.
  • Next check: one unresolved question.
  • Decision: needs review, keep for discussion, or reject.

An ID and a UTC timestamp are added by the app. Store the full brief even when only one sentence changes. A chain of “same as before, except…” notes is difficult to reconstruct after its context disappears.

Here is a synthetic example, not a report of a generation run:

Label: layout-003
Brief: One bedroom. Separate the work area from the bedroom.
       Keep the entry connected to the kitchen.
Observation: Changed only the requested work-area position.
             This draft appears to put it beside the living area.
Next check: Confirm the desk and chair dimensions against measurements.
Decision: Needs review

“Appears to” is useful language here. A visual observation does not establish that a dimension is correct. The log records a person's interpretation; it does not certify the drawing.

A complete single-file implementation

Save this as revision-log.html. It includes explicit form labels, a status region, JSON export, and conservative handling of unreadable stored data.


 lang="en">
 charset="utf-8">
 name="viewport" content="width=device-width, initial-scale=1">
</span>Layout revision log<span class="nt">

Layout revision log

Record one change per revision. This page sends no data to a server. id="entry-form"> Revision label name="label" required maxlength="120"> Full prompt / brief name="brief" required maxlength="8000"> Change and observation name="observation" required maxlength="4000"> Next check name="next" required maxlength="300"> Decision name="decision"> value="review">Needs review value="keep">Keep for discussion value="reject">Reject id="save" type="submit">Save revision id="export" type="button">Export JSON backup id="status" role="status" aria-live="polite"> id="entries" aria-label="Saved revisions">

Serve the file from a consistent local origin:

python3 -m http.server 8765 --bind 127.0.0.1

Open http://127.0.0.1:8765/revision-log.html in a current browser. Run the command in the directory containing the file. Localhost also provides the secure context used by crypto.randomUUID().

Avoid treating direct file: access as a portable persistence setup. MDN documents that localStorage behavior for file URLs is undefined and can differ between browsers. Storage is tied to an origin, so switching between localhost, 127.0.0.1, or another port creates a different storage context. MDN: localStorage.

Two details that prevent misleading success

The app writes the proposed updated array to storage before clearing the form. If writing fails, the old in-memory list remains in place and the unsaved text stays in the form. The status message reports failure rather than pretending the revision was saved.

Loading also fails conservatively. A missing key means an empty log; malformed JSON or an unexpected record shape disables writing. Silently replacing a corrupted log with an empty array would destroy the evidence needed to investigate it. This minimal version leaves recovery to browser storage inspection; it does not include a recovery UI.

Records are rendered with textContent. A prompt containing