Repository navigation
PostgreSQL Stores: no attach; one view, Runs on, and a connection you can edit - #37
Merged
Merged
Conversation
… can edit LayerFS no longer has store.attach and store.detach: a PostgreSQL Store's Sandboxes run on any machine that reaches its server (LayerFS branch claude/pg-implicit-attach). The UI follows. - Each PostgreSQL Store has a "Runs on" machine, kept by the plugin in <root>/store-machines.json: docker when it exists and runs PostgreSQL Sandboxes, else native. New sessions of its projects start there. - Stores, PostgreSQL side: one view, database cards under a thin server header. The Servers and Databases toggle is gone. - One Connect a database dialog. After connecting it runs the check from the Runs on machine. - Check from a machine: store.status --machine, on demand, nothing recorded. A failed reach offers to give that machine its own address; a stopped machine says it is stopped instead. - Edit connection: store.update for the Store's URL, password reference and synchronous_commit, or one machine's own connection. - Store page: a Connection tab with the connection, Runs on, and the machines that have a connection of their own. - Project create in a PostgreSQL Store: connect, init, runs-on, start the machine, open. - Attach and detach are removed from routes, menus, steps and Health. Routes: POST /api/stores/:s/connection, GET /api/stores/:s/check?machine=, POST /api/stores/:s/runs-on. Needs a LayerFS runtime with store.update. Spec: docs/specs/layerfs-postgresql-connection.md replaces layerfs-postgresql-attach.md. Tests: 687 of 689 pass, 1 skipped; "every pinned CLI call is classified as its kind" fails on home.init, as it does without this change. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On a server that already has a Store, the password toggle has three options, and its segments are all as wide as the longest label. "Same as <store>" made the toggle wider than the dialog: the note beside it wrapped one word per line, and in the Type and Reference modes the input was squeezed to nothing. - The first option is a fixed short label, "Saved"; no label carries a Store's name. - The sentence naming the Store is the field's hint, under the row at full width. - The toggle wraps under the input when the row is too narrow for both. Checked on 3080 in the 560 px dialog and a 400 px window, all three modes: nothing overflows the dialog. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The new-server form was 867 px tall: the URL, then the same host, user
and database again as three more fields, a hint under most of them, and
the machine tiles. It is now 647 px.
- A new server is given as one connection URL, which is required. The
separate Host and port, User and Database fields are gone; the Store's
name still defaults to the database's.
- A URL that names no server or no database is refused inline once
Connect is tried; a password in it is refused as before, now also when
the scheme is left out.
- On a known server the form still asks only for the database.
- Shorter hints: one line under the URL, the database and Runs on; none
under the Store name, whose field already shows the default.
Checked on 3080: both forms, an incomplete URL, a URL with a password,
and an unreachable server (LayerFS's refusal shows inline).
Tests: 689, 687 pass, 1 skipped, 1 fails as before this change ("every
pinned CLI call is classified as its kind", on home.init).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
LayerFS drops
store.attachandstore.detachin Ephemeral-AI-Lab/layerfs#733: a PostgreSQL Store's Sandboxes run on any machine that reaches its server. The UI follows.<root>/store-machines.json(docker when it exists and runs PostgreSQL Sandboxes, else native). New sessions of its projects start there.store.status --machine), nothing recorded. A failed reach offers to give that machine its own address; a stopped machine says it is stopped.store.update).Routes:
POST /api/stores/:s/connection,GET /api/stores/:s/check?machine=,POST /api/stores/:s/runs-on.Needs
A LayerFS runtime that has
store.update(the LayerFS pull request above). With an older runtime, Edit connection and the check fail.Checks
tsc,node scripts/build.mjs.home.init, as it does without this change.c5751130a3: the PostgreSQL Stores view, Connect a database (wrong port, then right), Check from native and from a running and a stopped docker machine, Runs on change, a Sandbox for a PostgreSQL project on docker, a machine's own connection (two refusals, save, remove), the Store page's Connection tab and a machine page's Stores tab.Not verified
Known gaps
hosthas no port.🤖 Generated with Claude Code