Skip to content

feat(production): fleet sync button for Machine Management - #12

Merged
tech5-opti merged 2 commits into
mainfrom
tushar
Aug 21, 2026
Merged

feat(production): fleet sync button for Machine Management#12
tech5-opti merged 2 commits into
mainfrom
tushar

Conversation

@tech5-opti

Copy link
Copy Markdown
Collaborator

Machine Management had no way to populate itself. POST /machine-fleet/sync is the only thing that fills the fleet — nothing runs on a timer or at startup — and only cmd/fleetsync or a bare API call could reach it.

That is why tensor.optiminastic.com/dashboard/all/production/machines shows an empty table: the backend answers fine, it simply has no machines to return.

What this adds

  • FleetSyncButton beside the page header, mirroring OrdersSyncButton
  • syncFleetAction server action + syncFleetMachines service call + FleetSyncResultSchema

Staying manual is deliberate: the printer host is a laptop on a home network reached over Tailscale, so polling it on a schedule would fail routinely whenever it sleeps, and the fleet changes rarely.

Zero printers is reported as a problem rather than a success — BambuBuddy answering with an empty fleet looks identical to a broken connection when the table was already empty.

Verified

cmd/fleetsync against BambuBuddy over Tailscale:

fleet synced from bambubuddy  printers=1 removed=1
synced 1 printer(s), removed 1: [opti1]

tsc --noEmit and eslint clean.

🤖 Generated with Claude Code

tech5-opti and others added 2 commits August 21, 2026 12:28
The page had no way to populate itself. Nothing syncs the fleet on a
timer or at startup - POST /machine-fleet/sync is the only thing that
does, and only cmd/fleetsync and a bare API call could reach it. So a
fresh deployment showed an empty table with no route forward, which is
exactly what happened on tensor.optiminastic.com: the backend answered
fine, it simply had no machines to return.

Deliberate that it stays manual. The printer host is a laptop on a home
network reached over a VPN; polling it on a schedule would mean routine
failures whenever it sleeps, and BambuBuddy is the source of truth for a
fleet that changes rarely. OrdersSyncButton makes the same trade for
Shopify, and this mirrors it, down to sitting beside the page header.

Zero printers is reported as a problem rather than a success: BambuBuddy
answering with an empty fleet looks identical to a broken connection
when the table was already empty, and the difference is worth stating.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tensor Building Building Preview Aug 21, 2026 6:59am
tensor-9bct Building Building Preview Aug 21, 2026 6:59am

Request Review

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6dcda945-28ab-4710-a551-1f2555bcbdfe


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.

@tech5-opti
tech5-opti merged commit fafdaa8 into main Aug 21, 2026
2 of 5 checks passed
@sonarqubecloud

Copy link
Copy Markdown

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