Repository navigation
Merged
8000
Settings › Access & embedding gets "Reachable from other devices on this
network", and Settings › Components the edition (Full or Lean). Changing
either says what will happen and applies with one button: the machine's
upgrade agent runs install.sh again for the version running with
LENS_PUBLIC or LENS_TARGET, and Lens restarts, the way Settings › HTTPS
opens the HTTPS ports with LENS_HTTPS. Without an agent the section shows
the install line to run. Before, both needed the install line again.
Choices made:
- Current values come from the environment Lens was started with.
docker-compose.prod.yml passes LENS_TARGET (${LENS_TARGET:-full}, the
build target's own default) and LENS_BIND (${LENS_BIND:-127.0.0.1}, the
web port's) to the API and workers; a microsandbox already exports .env.
install.sh needs no change for it. Started any other way, both read as
null and the UI says it can't tell, never a guess. A loopback LENS_BIND
is "this machine only", any other address "reachable".
- updates.reconfigure takes https, public and target and writes only the
lines that are set: an HTTPS request is byte for byte what it was.
lens-upgrade.sh reads public= and target= with val, keeps only 0|1 and
full|lean, passes LENS_TARGET (else .env's) and LENS_PUBLIC (empty when
not asked, which is install.sh's own fallback to LENS_BIND).
- GET/PUT /api/v1/admin/install on the updates router (AdminReader,
AdminWriter, audited as lens.install). PUT leaves alone what is so
already, and with nothing left to change restarts nothing (200); without
an agent it answers 409 with the line to run; `manual` has the line for
each choice.
- MCP tools install_settings and set_install_settings, next to monitoring
and set_monitoring, the comparable machine tools. The chat assistant's
ops tools expose no machine changes, so none were added there.
- UI: no confirm dialog; switching back cancels; keeping Lens to this
machine while the page is open at a network address warns that this
browser may lose it there.
- Stored data: the run record gains optional public and target fields,
read with .get and simply absent from older rows, so no upgrade step.
- threat-model.md records the new admin surface (the variants, the inbox
lines and the endpoints); the YAML and JSON follow it.
Refine later (docs/updates.md): Windows installs get the Linux/Mac line;
installs not started by install.sh, compose or a microsandbox show both
as not known.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014Y4mUBxDN6pTR2fykqrfYV
Requested by Adeel · project thread
Description
Before: whether the web app is reachable from other devices on the network (
LENS_PUBLIC) and the edition (LENS_TARGET, full or lean) were chosen on the install line, and changing either meant running the line again in a terminal.After: Settings › Access & embedding has Reachable from other devices on this network, and Settings › Components has the edition (Full, with LibreOffice and Chromium, or Lean). Changing either says what will happen and applies with one button: the machine's upgrade agent runs the install again for the version running, and Lens restarts, the same way Settings › HTTPS opens its ports. Without an agent, the section shows the install line to run. Agents use
GET/PUT /api/v1/admin/installand the MCP toolsinstall_settingsandset_install_settings.How:
updates.reconfigurenow takespublicandtargetnext tohttpsand writes only the lines set, so an HTTPS request is unchanged.lens-upgrade.shreadspublic=(0|1) andtarget=(full|lean) and passes them to install.sh; anything else is dropped. The current values come fromLENS_BINDandLENS_TARGET, whichdocker-compose.prod.ymlnow passes to the API (a microsandbox already has them); started any other way, the UI says it can't tell rather than guess. Rebased onto the upgrade page from #262: the agent's rollback and step reporting are kept, and the new run fields sit alongsidestepandrestore.Types of changes
!in the title)Checklist:
make hookschecks it on commit).__tests__/install-settings.test.tsx)docs/accordingly. (updates.md "Setting the machine up again", configuration.md, get-started.md, mcp.md)## UnreleasedinCHANGELOG.md.Done questions (AGENTS.md)
GET/PUT /api/v1/admin/install, MCPinstall_settings/set_install_settings.lens.install); the agent accepts only 0|1 and full|lean; threat-model.md/yaml/json record the new surface.make openapi) updated.🤖 Generated with Claude Code
https://claude.ai/code/session_014Y4mUBxDN6pTR2fykqrfYV
Generated by Claude Code