Skip to content

fix: a wizard that congratulated failed deploys, and a modal missing its own recommendation (beads batch 11) - #193

Merged
GeiserX merged 2 commits into
mainfrom
fix/beads-batch-11
Aug 4, 2026
Merged

fix: a wizard that congratulated failed deploys, and a modal missing its own recommendation (beads batch 11)#193
GeiserX merged 2 commits into
mainfrom
fix/beads-batch-11

Conversation

@GeiserX

@GeiserX GeiserX commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Two screens that told the user something untrue.

4og — the wizard congratulated you for deployments that never happened.

The final screen was unconditional markup: "You're all set! Your services are being deployed." Shown whether five deployed, none did, or every deploy returned 403. wizardState.deployed was written twice and read nowhere, so a user whose deploys all failed was congratulated and sent to an empty dashboard with no idea anything had gone wrong.

Now rendered from what actually deployed, exercised in a real DOM across all four cases:

all deployed   -> You're all set!       Deployed: honeygain, earnapp. …
partial        -> Partly deployed       Deployed: honeygain. 1 service could not be deployed …
none deployed  -> Nothing was deployed  None of the selected services could be deployed …
nothing chosen -> Setup saved           Nothing was deployed, because no services were selected.

zr9 — the modal hid exactly the credentials the app recommends.

Bytelixir's session cookie expires in ~2 hours; its remember_web and xsrf_token cookies last a year and are what stop collection dying the same afternoon. Both are optional, so the credential-health panel said "a longer-lived credential exists for this service" while the modal it links to offered nowhere to put it.

Storj was worse — its only field is optional, so the modal rendered no inputs at all.

storj      0 fields -> 1
bytelixir  1 field  -> 3

Optional fields are labelled so they aren't mistaken for required.

Verification: 2521 tests, 95.14% coverage, ruff clean, JS parses. Negative controls: reverting the field filter fails 1 test; reverting the wizard copy and its render call fails 2 more.

Summary by CodeRabbit

  • New Features

    • Credential setup dialogs now display all available fields, including clearly labeled optional inputs.
    • Setup completion now summarizes deployment outcomes, distinguishing saved, failed, partial, and complete results.
    • Completion messaging now directs users to monitor status and earnings.
  • Bug Fixes

    • Corrected misleading deployment-success messaging.
    • Restored missing optional credential fields in setup dialogs.

CashPilot-4og — the wizard's final screen was unconditional markup:
  "You're all set! Your services are being deployed." It said that
  whether five services deployed, none did, or every deploy returned
  403. wizardState.deployed was written twice and read NOWHERE, so a
  user whose deploys all failed was congratulated and sent to an empty
  dashboard with no idea anything had gone wrong.

  Step 4 now renders from what actually deployed, with four distinct
  outcomes: everything deployed, partly deployed (naming how many did
  not), nothing deployed though services were selected, and nothing
  selected in the first place. Exercised in a real DOM against all four.

CashPilot-zr9 — the credential modal filtered to required fields, which
  hid exactly the credentials the app recommends.

  Bytelixir's session cookie expires in about two hours; its
  remember_web and xsrf_token cookies last a year and are what stop
  collection dying the same afternoon. Both are optional, so the
  credential-health panel said "a longer-lived credential exists for
  this service" while the modal it links to offered nowhere to put it.

  Storj was worse: its only field is optional, so the modal rendered no
  inputs at all — an empty dialog.

  Every field is rendered now, with optional ones labelled so they are
  not mistaken for required. storj goes from 0 fields to 1, bytelixir
  from 1 to 3.

Negative controls: reverting the filter fails one test, reverting the
wizard copy and its render call fails two more.
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@GeiserX, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 37 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 45ed77c6-6752-413d-a216-c70f84adbd3a

📥 Commits

Reviewing files that changed from the base of the PR and between 7cfb711 and 569bc2b.

📒 Files selected for processing (2)
  • app/static/js/app.js
  • tests/test_beads_batch_11.py
📝 Walkthrough

Walkthrough

The setup wizard now reports the actual deployment result. Credential modals now show optional collector fields and label them clearly. Tests cover deployment outcomes, field counts, optional labels, and health-panel recommendations.

Changes

Wizard UI updates

Layer / File(s) Summary
Credential field rendering
app/static/js/app.js, tests/test_beads_batch_11.py
Credential modals render optional collector fields and label them as optional. Tests cover Storj and Bytelixir field counts and optional cookies.
Deployment outcome reporting
app/static/js/app.js, app/templates/setup.html, tests/test_beads_batch_11.py
The final wizard step updates addressable completion elements with saved-only, failed, partial, or complete deployment results. Tests verify the deployment state and rendering flow.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 43.75% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies both main changes: accurate deployment messaging and complete credential-modal recommendations.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/beads-batch-11

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/static/js/app.js`:
- Around line 1592-1596: In app/static/js/app.js lines 1592-1596, update the
setup completion flow around _deployToWorkers to track whether deployment was
attempted, showing “Setup saved” when selected services were skipped and
retaining the failure message only when an attempted deployment has zero
successes. In tests/test_beads_batch_11.py lines 44-63, add a regression test
covering selected services reaching step 4 without a deployment attempt and
verify the saved-setup messaging.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 89a8f5c9-1554-4fe7-9c48-ad57878a6046

📥 Commits

Reviewing files that changed from the base of the PR and between 1f58795 and 7cfb711.

📒 Files selected for processing (3)
  • app/static/js/app.js
  • app/templates/setup.html
  • tests/test_beads_batch_11.py

Comment thread app/static/js/app.js Outdated
GeiserX added a commit that referenced this pull request Aug 4, 2026
tests/test_beads_batch_11.py is PR #193's work. A broad `git add -A
tests/` swept it onto this branch, where the code it tests does not
exist — so it failed here, and I pushed that.

Scope check after removing it: this branch touches the two compose
files, the cryptography constraint in pyproject/requirements, uv.lock,
and the compose-pin test. Nothing else.
From CodeRabbit on this PR, and a real gap in the fix it reviewed.

Step 3 offers 'Skip to Summary', so a user can select services and reach
the final screen having deployed nothing. My first version keyed only on
deployed.length === 0, so it told them 'None of the selected services
could be deployed' — sending them to hunt a failure that never happened,
which is a different way of being wrong than the bug I was fixing but
the same kind.

The distinction is whether a deploy was ATTEMPTED, so deployService now
records that. Five outcomes, exercised in a real DOM:

  all deployed     You're all set!
  partial          Partly deployed (names how many did not)
  attempted, 0 ok  Nothing was deployed
  skipped step 3   Setup saved — nothing deployed YET
  none selected    Setup saved

Also asserted that the flag is initialised in both the declaration and
the reset: a flag nothing resets would carry the first run's state into
a second pass through the wizard.

Negative control: removing the skip branch fails the test that names it.
@GeiserX

GeiserX commented Aug 4, 2026

Copy link
Copy Markdown
Owner Author

Fixed — you were right, and it is the same kind of wrongness as the bug this PR set out to fix.

Step 3 offers Skip to Summary, so a user can select services and reach step 4 having deployed nothing. Keying only on deployed.length === 0 told them "None of the selected services could be deployed" — sending them to hunt a failure that never happened.

The distinction is whether a deploy was attempted, so deployService records that now. Five outcomes, exercised in a real DOM:

all deployed     You're all set!
partial          Partly deployed (names how many did not)
attempted, 0 ok  Nothing was deployed
skipped step 3   Setup saved — nothing deployed YET
none selected    Setup saved

I also asserted the flag is initialised in both the declaration and the wizard reset — a flag nothing resets would carry the first run's state into a second pass.

Negative control: removing the skip branch fails the test that names it. 2524 tests, ruff clean.

@GeiserX
GeiserX merged commit 108807c into main Aug 4, 2026
8 checks passed
@GeiserX
GeiserX deleted the fix/beads-batch-11 branch August 4, 2026 11:31
GeiserX added a commit that referenced this pull request Aug 4, 2026
… past a CVE (#194)

* fix: the quickstart installed 1.4, and bump cryptography past a CVE

Issue #188 is someone unable to create an account on v1.4. The cause is
the first-run setup-token bug — v1.4.4 has the token gate in deps.py and
no token field in onboarding.html, so the owner account cannot be created
at all — fixed months ago in v1.11.0.

They got that version from us. docker-compose.yml pinned 1.4 while its
own header said the images "track the `latest` tag", and told the reader
to replace `:latest`, a string the file did not contain anywhere. Anyone
checking whether they were current concluded they were.

Both compose files now pin 1.11, and the header describes what the file
actually does. A test asserts the pin equals the newest released
major.minor rather than a fixed number, so this fails the next time it
falls behind instead of quietly aging for seven minor versions.

Also bumps cryptography to >=50.0.0 for the open Dependabot alert
(high: PKCS#7 EnvelopedData decryption exposes a Bleichenbacher oracle).
CashPilot uses Fernet, not PKCS#7 EnvelopedData, so the vulnerable path
is not one we call — but the constraint allowed the vulnerable range and
there is no reason to keep it.

Verifying this took three attempts, which is worth recording. I first
concluded v1.4 had no token gate at all, from `git show v1.4:... | grep
-c` returning 0 — the tag is v1.4.4, `git show` produced NOTHING, and a
count of zero on empty input reads exactly like a confirmed absence. The
byte counts in the corrected check are there so a later reader can tell
the two apart.

* fix: complete the CVE fix in the lockfile, and stop the pin test skipping in CI

All three from CodeRabbit on this PR, all correct.

The cryptography bump was INCOMPLETE. Dependabot's alert names uv.lock
as the manifest, and the lock still declared >=48.0.1 and pinned
cryptography 48.0.1 — inside the vulnerable range — so changing
pyproject.toml and requirements.txt alone would have left the alert open
while looking fixed. Regenerated with `uv lock --upgrade-package
cryptography`: now 50.0.0, and the diff touches nothing else.

The drift test would have SKIPPED in CI. actions/checkout does not fetch
tags, so `git tag` returns nothing there and the test hit its own
pytest.skip — decorative in the one place it is meant to run, which is
the same shape of defect as the stale pin it guards. CI now fetches
tags, and the test FAILS rather than skips when CI has none, so a
regression in the workflow cannot quietly disarm it.

The pin scan now includes commented lines. docker-compose.fleet.yml's
commented remote-worker block is a template users uncomment and run, so
a stale pin there ships an old image just as surely as a live one — and
my first version stripped comments precisely to ignore it.

Verified locally: cryptography 50.0.0 exists and installs cleanly; the
suite ran against 48.0.0 here because this venv has no pip, while CI
installs from requirements.txt and exercises 50.0.0.

Negative control: planting a stale pin in the commented template now
fails the test.

* chore: remove a test file that belongs to another branch

tests/test_beads_batch_11.py is PR #193's work. A broad `git add -A
tests/` swept it onto this branch, where the code it tests does not
exist — so it failed here, and I pushed that.

Scope check after removing it: this branch touches the two compose
files, the cryptography constraint in pyproject/requirements, uv.lock,
and the compose-pin test. Nothing else.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant