fix(onboarding, deploy): checklist updates without a reload; 1-Click first boot serves again - #2862
Conversation
The store fetched the checklist once per page load, so a milestone reached mid-session (creating an agent from the dashboard, or chatting, scheduling or connecting a channel on another page) stayed unticked until a browser refresh. Re-read on every mount, so returning to the dashboard picks up milestones reached elsewhere, and whenever the agent count changes, since agents are created and deleted from the dashboard itself. Refs Abilityai/trinity-enterprise#238 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
/review ReportBranch: Critical Findings (block merge)None. Informational Findings (review required)[I1] Product bar / perf (4.15, 4.11): on OSS and unentitled builds the fix turns one swallowed 404/403 per session into one per dashboard mount, per sidebar expand and per agent create/delete (Confidence: 8/10) [I2] Concurrency (4.2): overlapping forced fetches have no ordering; the last response to arrive wins (Confidence: 5/10 → appendix) [I3] Test gap (4.9): the behaviour is verified by hand only; a structure spec is possible and is this repo's precedent (Confidence: 6/10) [I4] Behaviour note (4.5): the length trigger misses same-size changes (Confidence: 4/10 → appendix) Clean Categories
Summary
Review complete. Next: |
The 1-Click first boot runs start.sh under `umask 077`. Since the Caddyfile is rendered to Caddyfile.new and moved into place, the new file came out 0600 root, the `caddy` service user could not read it, the restart failed, and provisioning stopped before Trinity started: a droplet created from the v0.9.5-rc4 snapshot never served HTTPS. Overwriting in place had kept the package's 0644, so rc3 booted. chmod 0644 before the move (the file holds no secrets). The new test runs provision_caddyfile under umask 077 and asserts the installed mode. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Bumps VERSION to 0.9.5-rc5 and points trinity-do-create.sh's default TRINITY_IMAGE_TAG at v0.9.5-rc5 (tied to VERSION by test_2380_installer_release_pin), so the v0.9.5-rc5 tag can be cut off dev with the Caddyfile permission fix for the DigitalOcean Marketplace snapshot. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…rced read The checklist now forces a read on every mount, sidebar expand and fleet-size change. On OSS (404) and unentitled (403) builds that turned one swallowed request per session into one per event, each with a console 404, for a card that never renders. A 404/403 now marks the surface absent for the session; a genuine failure (5xx) stays retryable. Addresses review finding I1 on #2862. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Thanks @dolho. Your review was posted before I1: fixed in I2: not changing. I3: not adding the component-source pin. The #2773 merge-train review rejected exactly this shape ("a I4: agreed, a known edge. No milestone depends on the agent name, and the next mount catches it. Frontend unit suite: 3078 passed, 1 failed. The failure is |
/review Report — re-review at
|
|
@dolho re-review: I1: split. I2 (umask 077 beyond the Caddyfile): checked every file I3: agreed, and noted in the comment. I4: leaving as is, for the reason in my previous reply (the merge train rejected this pin shape on #2773). Happy to add it if you and vybe agree it's wanted. |
Found while render-checking #2854 on a local stack with the enterprise submodule (release work-order M4).
The bug
stores/onboarding.js::fetchChecklistreturns early onceloadedis set, andActivationChecklistcalled it withoutforce. So the checklist was read once per page load. Create an agent from the dashboard and it still says 0/4 until a browser refresh; the server already had it right (refresh shows 1/4).This predates #2854 — the inline placement from #2278 had the same fetch-once behaviour.
The fix
In
ActivationChecklist.vueonly:KeepAliveinclude list, so the component remounts on return.agentsStore.agents.lengthchanges. Agents are created and deleted from the dashboard itself, and the WSagent_created/agent_deletedhandlers already keep that list current. Deletion matters too: milestones untick honestly.Completion stays server-derived; nothing is ticked optimistically.
Verification
Playwright against the local stack (enterprise submodule mounted), checklist response patched to control completion:
npx vitest run tests/unit/firstRunSteps.spec.js tests/unit/rawColorRatchet.spec.js tests/unit/loadingGateRatchet.spec.js— 76 passed.No new unit test: vitest runs
environment: nodewithout a mount harness (the ent#392 constraint), so the specs can only assert source structure, and the behaviour above is what matters.Not in this PR
The checklist's "Create an agent" action routes to
/, which is the dashboard it is shown on, so on the dashboard that button does nothing. The route comes from the server side, so it's a separate fix.Also in this PR: the 1-Click first boot never served (Caddyfile permissions)
A droplet created from the
v0.9.5-rc4Marketplace snapshot never answered on 443. First boot stopped at:firstboot.shrunsstart.shunderumask 077. Since #2773,provision_caddyfilerenders toCaddyfile.newand moves it over the live file, so the new file came out0600 root. The Caddy unit runs asUser=caddy, so the restart failed and provisioning stopped before Trinity started. The old in-place overwrite kept the package's0644, which is why rc3 booted.4f93d4e37runschmod 0644before the move (the file holds no secrets). New testtest_the_installed_caddyfile_is_readable_by_the_caddy_user_under_a_strict_umaskruns the real function underumask 077: red before the fix (0o600), green after.ac1c2a2ad) is reverted inea0649aadand moved to its own PR, chore: set version to 0.9.5-rc5 #2866, per review finding I1.Verified on a real droplet: a snapshot built from rc4 with this
start.shcame up on HTTPS with a valid Let's Encrypt IP certificate 184s after create./etc/caddy/Caddyfilewas644, Caddy active, first boot complete, all containers healthy.pytest tests/unit/test_2380_*.py tests/unit/test_2692_private_network_access.py tests/unit/test_2281_*.py: 200 passed.Refs abilityai/trinity-enterprise#238
🤖 Generated with Claude Code