Commit Graph
3145 Commits
Author SHA1 Message Date
Juan Denis 1e733d0bf8 Merge pull request #270 from jhd3197/claude/serverkit-work-tree-issues-33a9d1
Adopt existing host sites and close four authz gaps
v1.11.43-dev.1e733d0
2026-11-26 02:30:59 -05:00
Juan Denis 2366d8b9bf Mount site adoption on the apps blueprint
The adoption routes added a blueprint to the curated core
registry, which is kept exact on purpose. They now register on
the existing apps blueprint as an area module, the way the
server area modules do, under /apps/host-sites.

The host-managed check becomes a function that compares the
attribute, so services handed a stand-in app object (as the
lifecycle tests do) get False instead of an AttributeError.
2026-11-22 02:44:27 -05:00
Juan Denis ebb19c8444 Read through services in the scoped routes
The workspace-scoped mobile and shared-variable routes queried
models in the controller, which the boundary inventory counts
as new crossings. They now go through WorkspaceService and
ManagedDatabaseService; the baseline drops the two crossings
the mobile routes no longer make.
2026-11-22 02:41:56 -05:00
Juan Denis 7768318e31 Raise typed errors from site adoption
The adoption routes shaped their own error bodies, which the
hand-shaped-error ratchet counts. The service now raises the
typed application errors and the global handler owns the body.
PHP_ETC_DIR stops reading the environment: nothing sets it.
2026-11-22 02:41:54 -05:00
Juan Denis 64181c5520 Hold workspace viewers to read-only on servers
GHSA-m72h-hc66-5jwx: server routes checked that the caller could
reach the server but not that they could write in its workspace,
so a member capped to viewer there could still re-pair the agent,
rename the server or edit its IP allow-list.

The write check now lives in the one helper every server route
resolves its server through, applied to mutating requests, so a
new route cannot forget it.
2026-11-22 02:30:16 -05:00
Juan Denis 1c6c43326e Authorize resolved shared-variable reads
GHSA-893r-j92f-5q9x: both resolved-variables routes took the
resource id, and the hierarchical one its workspace, project and
environment ids, straight from the query string and checked none
of them. Any account could name another workspace's id and read
its variable groups.

The caller must now be able to read the target resource and
every scope asked for; unknown resource types fail closed.
2026-11-22 02:30:14 -05:00
Juan Denis 60030b0b4e Keep backup hooks and app creation from viewers
GHSA-vrwv-j8w5-p94q: POST /apps took any authenticated account,
so a read-only viewer could create an app, own it, and set its
pre-backup hook, which the panel runs as a shell command on its
own host.

Creating a service now needs a developer or admin. Changing a
hook needs an admin, and the service refuses it by default, so
a new caller that forwards request data cannot hand out shell
access. Sending a hook back unchanged is not a change, so a
policy read by its owner still round-trips.
2026-11-22 02:30:11 -05:00
Juan Denis f605c6b95f Document adopting and hand-migrating a site
Adds the adopt-in-place mode to the coexistence guide, with what
a host-managed service does and does not let the panel do, and a
hand-migration checklist that ends in adoption so a migration no
longer bypasses the data model. Regenerates the API inventory.

Part of #269.
2026-11-22 02:13:13 -05:00
Juan Denis 7bc25e54c3 Offer unmanaged host sites on Services
When this server's nginx serves sites no service accounts for,
Services shows an Adopt button with the count; the dialog lists
each site with what was detected and adopts it in one click. The
button is absent on a host with nothing to adopt, so the top bar
stays quiet. Host-managed rows drop the start/stop controls and
the detail page names how they are run.

Part of #269.
2026-11-22 02:10:36 -05:00
Juan Denis 933216e911 Add serverkit adopt-site
Lists the sites host nginx serves, shows what adopting one
would record, and registers it with --apply. list-sites now
names a PHP-FPM site instead of calling it "port static".

Part of #269.
2026-11-22 02:02:48 -05:00
Juan Denis 4ba435243f Adopt sites already running on the host
A site set up by hand or by a migration serves traffic but has
no application, domain or WordPress row, so the panel cannot
see it. Every existing entry point creates something (a vhost,
a copy of the files), which is wrong for a site that is live.

Discovery reads the live nginx config, the PHP-FPM pools, the
certificate and wp-config.php. Adopting writes rows only, as a
dry run unless asked otherwise. The app is managed_by 'host',
and the vhost writer, drift repair, lifecycle and delete paths
leave its running config alone. The doctor reports sites nginx
serves that no application accounts for.

Part of #269.
2026-11-22 02:02:44 -05:00
Juan Denis 73e2251e28 Stop --help from running site commands
`serverkit add-site --help` wrote a vhost for a site named
"--help" and `setup-proxy --help` reran the proxy setup, which
reset the panel's certificate paths. Subcommands that take plain
positionals now print their usage for --help/-h and stop before
any command code runs, and add-site/remove-site refuse a name
that is not a hostname.

Part of #269.
2026-11-22 01:50:18 -05:00
Juan Denis f68819da02 Let ACME challenges past the dotfile deny
The shipped vhosts deny dotfiles with `location ~ /\.`, which
also matches /.well-known/acme-challenge/. nginx prefers a
matching regex location over a plain prefix one, so on the plain
HTTP vhost (both in one server block) HTTP-01 answered 403 and
issuance and renewal failed; a hand fix was undone by the next
update re-copying the file. `^~` stops the regex pass.

Part of #269.
2026-11-22 01:50:15 -05:00
Juan Denis 43c87cd5eb Scope fleet-wide server reads to the workspace
GHSA-qcjj-hf95-6rgw: the workspace check landed on every
<server_id> route, but the routes that list, search or export
across the fleet take no id in the path, so they kept answering
from unfiltered Server and ServerMetrics queries. Any account,
down to a viewer in no workspace, could enumerate other
workspaces' servers and read their metric history.

The fleet-monitor reads (heatmap, comparison, alerts, thresholds,
anomalies, search, both exports) and the mobile summary and
offline cache now take the caller and apply the rule GET /servers
uses. A sweep over every parameterless GET route found three more
of the same shape, fixed here too: the proxy overview, the
metrics retention stats, and server-group membership.
2026-11-22 01:44:59 -05:00
Juan Denis 2132f675c6 Merge pull request #259 from jhd3197/dev
Release: app network limit, WordPress PhpRedis and MySQL 8.4, dependency updates
v1.11.43
2026-11-14 23:38:19 -05:00
Juan Denis 86e6c7a088 Merge main into dev for release promotion [skip version] 2026-11-14 23:31:50 -05:00
github-actions[bot] 5e3c030f1d chore: bump version to 1.11.43 [skip ci] 2026-11-15 04:23:41 +00:00
Juan Denis ae2e3d23bc Sync bundled registry index to WordPress 1.0.6 v1.11.42-dev.ae2e3d2 2026-11-14 23:17:41 -05:00
Juan Denis 43c4872b56 Stream the pool-retry test through the shared stub
The streaming retry test patched subprocess.Popen by hand, which
the stub-adoption ratchet counts. The shared FakePopen could not
stand in because its stdout had no readline(); it does now, so the
test scripts the two compose runs through fake_subprocess instead.
2026-11-14 22:54:09 -05:00
Juan Denis 9d97a1c305 Give new WordPress sites PhpRedis and MySQL 8.4
Object Cache Pro refuses to start without the redis PHP extension,
which the upstream wordpress image does not ship, so the runtime image
now builds it and fails the build if it does not load.

Site Health flags MySQL 8.0 as outdated and WordPress recommends 8.4,
so new sites are created on 8.4. Existing sites keep the database
they have; nothing upgrades a data directory in place.

Fixes #252
Fixes #253
2026-11-14 22:28:04 -05:00
Juan Denis ccfd68607b Pin a subnet when Docker's address pools run out
Every compose project takes a bridge network from Docker's default
pools, and a stock daemon has about thirty. Past that every new stack
failed at network creation with "all predefined address pools have
been fully subnetted", however idle the host was.

compose up now answers that failure by giving the project's networks
a /26 from SERVERKIT_COMPOSE_SUBNET_POOL (10.213.0.0/16) and starting
again. The pin goes into the project's own compose file: a separate
override is undone by any plain compose up, which recreates the
network from the exhausted pools.

Fixes #254
2026-11-14 22:28:01 -05:00
Juan Denis 80f3b676a1 Bump backend dependencies
Takes the weekly backend group (SQLAlchemy, Flask-SocketIO,
python-socketio, click, boto3, Authlib, prompture), the tomli and
tzlocal floors, and two majors: Flask-Limiter 4 and psutil 7.

Flask-Limiter 4 binds the key function exactly as 3.5 did, so limits
key the same way. psutil 6 renamed Process.connections() and will
remove the old name; the process detail now calls net_connections().

Supersedes Dependabot PRs 256, 212, 210, 209 and 207.
2026-11-14 22:27:59 -05:00
Juan Denis c5eddd57ef Hold React 19 and ESLint 10 in Dependabot
Neither is a version bump. Runtime extensions are published bundles
that resolve React to the panel's own copy, so React 19 has to be
proven against every shipped extension first; and eslint-plugin-react
7.x still peers on eslint <= 9, so npm ci cannot resolve ESLint 10.

Closes the standing PRs 213, 214 and 215 instead of leaving them red.
2026-11-14 22:26:35 -05:00
Juan Denis b82420e586 Bump frontend dependencies
Takes the weekly frontend group (@xyflow/react, lucide-react,
@vitejs/plugin-react, globals, playwright, sass, vite, the Windows
rollup binary) and xterm 6. The fit and web-links addons were already
on the releases that pair with xterm 6.

Supersedes Dependabot PRs 255 and 211.
2026-11-14 22:26:32 -05:00
Juan Denis 8335aa940d Merge pull request #258 from jhd3197/dev
One list-page shell and per-KPI overview blocks
2026-11-14 21:59:09 -05:00
github-actions[bot] 25b116b5d9 chore: bump version to 1.11.42 [skip ci] 2026-11-15 00:27:12 +00:00
Juan Denis 423f4a8393 Update Monitoring layout baselines
One block per KPI, and the empty-monitors notice as a short
block; the images are the ones CI rendered for this change.
2026-11-14 19:20:16 -05:00
Juan Denis 2bef454045 Update layout baselines for the list shell
Services, SSL and Queue no longer carry a filter icon or a tools
menu; the images are the ones CI rendered for this change.
2026-11-14 19:10:02 -05:00
Juan Denis 8453631d99 Keep KPI tiles compact when the board stacks
Below tablet width every block stacks full width at a chart's
height, which turned each one-number tile into a tall empty card.
Tiles now sit two to a row at their own height.

The "nothing is watched yet" notice is its own short block, so a
page with no monitors is a line and a button instead of a tall
empty list beside the host tiles.
2026-11-14 19:09:58 -05:00
Juan Denis 4ba740a12d Guard the list-page shell in lint
check-list-chrome fails a table that grows its own filter icon or
tools menu, hoists controls into the top bar, orders the bar
differently, or adds a KPI strip outside the remaining allowlist.
2026-11-14 18:36:29 -05:00
Juan Denis 2871da1458 Make each overview KPI its own board block
An overview section that wraps a whole strip of KPI tiles is one
block on a board meant to be rearranged tile by tile. Each KPI is
now an OverviewSection with `tile`: the frame is the tile's card,
with no header outside edit mode. `replaces` swaps a retired block
in a saved layout for the blocks it was split into.

Applied to Monitoring, Backups, Server, Security and Workspace.
Security and Workspace move onto the overview board to get there,
so the backend accepts their layout scopes.
2026-11-14 18:36:24 -05:00
Juan Denis 36f8285bf3 Fold table controls into the view selector
Every list page placed its filter, tools menu, search and create
button differently: four homes for the filter and "⋮", three button
styles and five orders in the top bar.

The view selector's menu now holds filters and fields, copy link,
export, refresh and reset on every table (chrome.pickerProps), and
the top bar is always secondary buttons, create, then search
(ListActions / useListTopbar). PageLayout pages can publish into
their own bar, which puts Docker on the same shell as Servers.

Docker's KPI strip is gone, along with the four list fetches it
made only to count rows.
2026-11-14 18:36:13 -05:00
Juan Denis c9aa8bcbf0 Merge pull request #257 from jhd3197/dev
Release: unified detail pages, editable overviews, leaner list chrome
v1.11.41
2026-11-14 15:26:12 -05:00
github-actions[bot] 623a9622ba chore: bump version to 1.11.41 [skip ci] 2026-11-14 20:24:37 +00:00
Juan Denis 2732c97907 Tidy the Files toolbar
The row under the top bar held the search box, two wide selects, a
layout toggle and three icons beside the path, so the path it exists
to show was the smallest thing in it.

Search moves into the top bar, where every other page has it. Kinds,
sort order and hidden files become one View menu; the row keeps
navigation, the path, the layout toggle and refresh. The breadcrumb no
longer prints a separator after the root.
2026-11-14 15:08:42 -05:00
Juan Denis 5f23e9fe6d Put Monitoring and Backups on the overview board
Their overviews are now boards like the server and service ones: each
panel is a block that can be moved, resized, removed or opened
fullscreen, with dashboard widgets alongside (Monitoring's follow the
host the page is scoped to). Layouts are saved per user under two new
board scopes.

Every board gets a quiet "Edit overview layout" link under its blocks,
so pages without a menu of their own have a way in. Monitoring layout
baselines updated.
2026-11-14 14:59:05 -05:00
Juan Denis 74c24b93b3 Put the style guide on the page shell
The style guide dropped a PageTopbar and a tab strip into the padded
content well, so its bar floated with a gutter on every side: the
arrangement its own "Page headers" section warns against. It now uses
PageLayout, with the sections as the bar's tabs.
2026-11-14 14:59:01 -05:00
Juan Denis 6ecd3245bc Fold the servers table controls into the view
The servers top bar carried Groups, Sync, Add, search, a filter icon
and a tools menu, and the table opened with every column it had, so it
scrolled sideways.

The view selector's menu now holds Filters and fields, the table tools
(copy link, export, reset) and Manage groups; the top bar keeps Sync,
Add and search. The table opens with eight columns. Everything else
the list returns about a server is an optional field: services and
domains counts, IP, OS, architecture, cores, capacity, Docker, tags,
date added. Reset returns to that default set, not to "show all".

The Fields pane splits into what is in the table (reorder, switch off)
and the fields that can be added, with a search once the list is long.

GridViewPicker takes `filters`, `tools` and `extra`; GridToolsMenu's
content is now GridToolsPanel so it can live in either place. Other
tables keep their top-bar controls for now.
2026-11-14 14:46:24 -05:00
Juan Denis 4fa5caef79 Report services and domains per server
The server list could not say what a server carries. It now returns
services_count and domains_count for every row, computed for the whole
list in two queries and limited to the services the caller may see, so
a count never reveals something they have no access to.
2026-11-14 14:37:33 -05:00
Juan Denis ebf19e8a9e Rework the filters and fields drawer
The header repeated its own tabs ("Filters and fields" over tabs
reading Filters and Fields, a subtitle restating both counts), and an
empty filter list still showed a Match all/any sentence with nothing
to match.

The pane switch is now the header. An empty Filters pane offers the
filterable fields as one-tap chips; with conditions, the and/or switch
sits between them and Add condition follows the list. The footer
reports how many rows the conditions leave. Fields lists only named
columns and counts shown of total.

ds/Drawer gains `headless` for bodies that bring their own header; the
title stays for assistive tech.
2026-11-14 14:24:15 -05:00
Juan Denis 026b963c41 Drop the dashboard's Setup health banner
The status bar already shows the setup score on every page and opens
the same review, so the banner repeated it at the top of the dashboard.
Dashboard layout baselines updated.
2026-11-14 14:09:29 -05:00
Juan Denis 119e0e0f05 Remove the widget library's sideways scroll
The sticky filter bar cancelled the panel padding with negative side
margins, but that padding sits on the drawer, outside the scroller. The
bar therefore overflowed the scroller by 16px and gave the panel a
horizontal scrollbar while showing nothing extra.
2026-11-14 14:09:27 -05:00
Juan Denis 7c971883b1 Put detail overviews on the dashboard grid
The Overview tab of the server and service pages is now a board on the
dashboard's widget grid: the same frames, library, editor and
fullscreen view. Each page's cards are blocks, placed next to dashboard
widgets bound to the page's own server, and "Edit overview layout" in
the page menu lets a user rearrange them. The layout is saved per user
and kind, so it applies to every server (or service) page.

A block that has nothing to render leaves the layout until it does.
Rows are half a dashboard row so blocks of very different heights pack
without large gaps; dashboard widgets keep their size at twice the
row count.
2026-11-14 13:59:02 -05:00
Juan Denis e1972e7ee9 Store overview layouts as scoped boards
A user can now save the Overview layout of a kind of detail page
(server, service). It is an ordinary dashboard board whose slug names
the kind, so it reuses the existing storage, validation and ownership
rules and needs no new routes or migration: POST with a scope upserts
it, GET ?scope= reads it, DELETE returns to the shipped layout. Scoped
boards are never listed among the dashboard tabs.
2026-11-14 13:59:00 -05:00
Juan Denis 4e6f47da1c Replace dashboard tabs with one selector
A tab per dashboard pushed the board controls onto a second row and
grew with every board added. The bar now carries a single selector
that lists the dashboards, with New, Rename and Delete in its menu, so
the whole bar stays on one line. Dashboard layout baselines updated.
2026-11-14 13:40:13 -05:00
Juan Denis 1183dbb99c Compress the service overview
The KPI strip spent a full row on a status the header already shows
and three deploy counters that are usually zero. The counts move into
the Recent deployments header, and the short operational cards
(attached services, pooling, slot deploys) sit two-up instead of one
full-width row each.
2026-11-14 13:29:58 -05:00
Juan Denis 4baeec5141 Give the server page real top-bar actions
The server detail bar only had Ping while services have Deploy and
Restart. The primary action now follows the server's state: Terminal
opens that server's shell when it is reachable (the terminal page takes
?server=<id>), Connect opens the pairing dialog when it is not. Ping
stays, and a menu holds the connection string and Remove server.
2026-11-14 13:29:53 -05:00
Juan Denis 84de7c29e5 Restore the identity header on detail pages
Folding the entity's name, status and tabs into the top bar left the
page without a header: the name was a small bar title and its facts
sat behind an info tip.

Server and service detail go back to the earlier anatomy, built once in
components/detail/DetailPage: a breadcrumb top bar, an identity block
(tile, name, status, key facts) and the tab strip under it with
Settings at the far end.
2026-11-14 13:18:06 -05:00
Juan Denis 26d3fab766 Unify server and service detail layout
The two entity pages shared a top bar but nothing below it: the server
page was capped at 1400px and centered while services ran full width,
the service header spelled its facts out as unseparated text, and each
page had its own stat tiles, cards and settings layout.

Both now sit on the same shell body and share the header meta (status
dot, info tip, star), the KPI tiles and overview cards, and one grouped
settings shell. Server settings sections get URLs like the service
ones (/servers/:id/settings/:section).
2026-11-14 12:54:16 -05:00
Juan Denis b10e220300 Merge pull request #201 from jhd3197/dev
Release: agent permissions, mobile UX improvements, and security hardening
v1.11.40
2026-11-14 02:46:59 -05:00