Repository source: docs/plans/deploy_prompt_sticky/deploy_prompt_sticky_one_shot.md
Header Deploy now stays once it appears
Cycle: v3/deploy_prompt_sticky; Mode: one-shot; Record/index: this file, plans index
Debug mode: enabled (project marker .railspike_debug_on)
Effort study: railspike-effort, protocol P2, reference R1; cycle ledger. Standing enrollment.
Extended estimates: disabled (no real alternatives or work units)
Cycle estimate: 0.12 (intake, after reading deploy_prompt.js, its browser test and the header partial)
Status: implemented and verified locally; next permitted action: maintainer review (PR), then a look on his phone after deploy.
Original request
Feedback item PF-20261129-B03, "Header Deploy now button disappears between pages". ilyag, 2026-11-29 (https://zenmemes.com/threads/thread-20261129004446-f6d39d32): "a bug with the "deploy now" button that appears in the navbar, it should stay appeared once it appears, not re-query the server."
Authorization
The maintainer's scheduled daily task (stored prompt, run 2026-11-29): "Pick the most salient unclaimed backlog item(s) that are one-shot eligible ... Claim the item first ... Implement it following the repo's one-shot conventions, then open the PR." Authorizes this one-shot through an open PR and a thread reply. Exclusions: merging, deploying, anything the server allows or refuses, the Deploy page itself.
Claim: https://zenmemes.com/threads/thread-20261129004446-f6d39d32#reply-20261129191635-b484cb94b2310afa055bab2681a50654 (zenmemes.com has no backlog claims thread configured, so the claim: reply went in the source thread).
Outcome and work type
Application change. In a browser that has deployed before, once a header check finds the site behind, Deploy now shows on every later page from first paint, with no request to the server. It stays until a deploy from the header reports deployed or up to date, a header check (only made while nothing is remembered) finds the site up to date, or the server refuses (403), which forgets the browser as today.
Approach and risks
Remember the "behind" answer in localStorage (
forum_deploy_prompt_behind, holding the commit the check reported) next to the existingforum_deploy_promptmarker.First paint: the existing head script in
layout.php(the one that setsdata-memberanddata-visitor) setsdata-deploy-behindon<html>when both keys are present;site.cssshows.deploy-prompt[hidden]under that attribute, except on the Deploy page, which has its own buttons.deploy_prompt.jsthen clearshiddenso script state matches.Considered: revealing from the deferred script only. Simpler, but the button would still pop in after paint on every page, against CONTRIBUTING's first-paint rule.
Risk: a deploy made elsewhere (Tools → Deploy on another device, SSH) leaves the remembered button showing. Pressing it gets
up_to_date, which reloads and clears it. Accepted: the maintainer asked for no re-query.Risk: theme CSS that styles
.deploy-prompt(Underground) relies on:not([hidden]); check the phone rule insite.csscovers the attribute case too.
Reuse decisions
public/assets/deploy_prompt.jsextended in place (check,deploy,forget).templates/layout.phphead script: one more guardedtryblock besidedata-member/data-visitor, emitted only with the header prompt flag on.public/assets/site.css.deploy-promptrules extended.tests/browser/deploy_prompt.mjsextended; it already serves the layout fixture and mocks/tools/deploy/.
Completion conditions
Remembered browser: first page load shows the button after the delayed check; the next page shows it at first paint with no /tools/deploy/ request. Deploy reports deployed or up_to_date: reload, button gone, memory cleared. 403 on deploy: memory cleared. Flag off or never-deployed browser: unchanged. Phone tabs don't move. Deploy with Deploy now; no schema change.
Concepts touched
None.
Verification and recovery plan
node tests/browser/deploy_prompt.mjswith new cases (remembered-behind shows at first paint with zero requests; cleared after deployed/up_to_date and 403); confirm the new case fails on the old script.node tests/browser/deploy_celebrate.mjs(shares the header)../v3 test --smokeplus any PHP test rendering the header prompt.Screenshot at 390 px and 1100 px in Gloss.
Not replayable here: the maintainer's production deploy flow on his phone. Reported unverified.
Recovery: revert the commit.
Starting revisions and branch
fix/deploy_prompt_sticky from origin/main 8272a89f937e.
Planning commit: 32d3e15 (plan and index entry only, before any implementation).
Debug log: deploy_prompt_sticky_debug_log.md
Study history
2026-11-29 UTC, intake and execution entry: 0.12, recorded after reading deploy_prompt.js and its test (not a clean intake). Claude, single exposed rater. Scope v1, reference R1, hashes not re-verified.
Dated execution history
2026-11-29: item claimed in the source thread; plan written and committed (
32d3e15).2026-11-29:
deploy_prompt.js: a check that finds the site behind storesforum_deploy_prompt_behind(the reported commit). With that stored, the script shows the button and makes no request. A header deploy that reports deployed or up_to_date clears it before reloading; a 403 forgets both keys. Failed, busy and dropped deploys keep it.2026-11-29:
layout.phphead script setsdata-deploy-behindwhen both keys are present (only with the flag on and the app header);site.cssshows the hidden prompt under that attribute, except on a page with[data-deploy-root], and keeps the phone row rule.2026-11-29, discovery (pre-existing, fixed because the test covers this change):
tests/browser/deploy_prompt.mjsfailed on main with "chicago 1100: no wrapped destinations". Chicago's own nav takes two rows at 1100 px in the fixture with or without the button (Gloss too), so the assertion now compares rows with and without the button on the same page. Whether eight destinations should fit one row at 1100 px is a separate layout question, not changed here.
Study history, closeout:
2026-11-29 UTC: retrospective scope assessment 0.15: the change was as planned; one stale browser assertion added work. Claude, single exposed rater. Maintainer judgment pending; measured time unknown.
Outcome
Delivered as planned. Deploy now stays once a check finds the site behind, shown from first paint on later pages with no request. Known limit: a deploy made elsewhere leaves the button up until it is pressed (it then reports up to date, reloads and clears).
Verification
node tests/browser/deploy_prompt.mjs: PASS. New cases: the behind answer is stored; the next page shows the button at once and makes no second check (390 and 1100 px, no tab moves); with the script blocked, the head script and CSS alone show it; not on a page with[data-deploy-root]; a stored answer without the deploy marker shows nothing; a finished deploy and a refusal clear it; failed, busy and dropped keep it. The new cases fail on the old script ("390: the behind answer is remembered").node tests/browser/deploy_celebrate.mjs: PASS../v3 test --smoke FeatureFlagEvaluatorTest: 497 run, 497 passed../v3 test BoardListTest PresentationProfileMatrixTest ZoomTableTest(render layout.php): 32 passed. The full suite was not run.Screenshots, Gloss at 390 and 1100 px with the script blocked: button beside / under the site name from first paint.
Not verified: the maintainer's phone on production, WebKit.
Final review
Diff: deploy_prompt.js, site.css, layout.php, tests/browser/deploy_prompt.mjs, the feedback item and index, this record, its debug log and ledger. Reuses the existing head script, prompt markup and test harness; no new dependency, flag, schema or server change.
Commit/merge/publication status
Completion commit b7b0b00 on fix/deploy_prompt_sticky; PR opened 2026-11-29 (see the branch's PR); not merged or deployed. This handoff commit records the completion reference.
Attribution: Claude · 2026-11-29 UTC · Model: claude-opus-5-5