You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3e044a7
Browse filesBrowse the repository at this point in the historyBrowse files
feat(flashforge): F6 — i18n connection states + CODEMAP entry
Final polish for the FlashForge live integration:
i18n: 4 connection-state keys added in 9 locales via npm run i18n:add
• ffgConnConnecting / Connected / Offline / Reconnecting
These are reserved for the surfaced connection-status text once the
live block grows a header row beyond the global Online / Offline pill.
For now the existing snapStatusOnline / Offline / Connecting keys
double-duty in renderFfgOnlineBadge so brand parity stays free.
CODEMAP.md:
• Bird's-eye structure now lists the FlashForge block at L7288-8345
• New section "FlashForge Live (HTTP polling)" documenting the
function anchors per sub-block (ping, polling lifecycle, parser,
renderer, filament-edit sheet, Apply branch)
• Cross-cutting wiring callouts so future contributors find the
grid-card + side-card + sheet hooks without grepping
• "Find X by feature" cookbook gains 3 FlashForge entries
(HTTP polling, live block UI, filament edit)
• Line ranges past the FlashForge block intentionally left as `…`
— they shifted by ~1100 lines and the precise ranges are tracked
by the next CODEMAP refresh
Verified clean:
• node --check renderer/inventory.js → no syntax errors
• npm run i18n:check → 9 locales × 571 keys
• git status → only the expected
files changed (renderer/inventory.js, renderer/inventory.html,
renderer/CODEMAP.md, renderer/locales/*.json)
| 7321-7370 |**`ffgPingPrinter`** — 2.5 s POST probe used for the printer-grid online dot. 30 s cache. |`ffgPingPrinter`, `ffgPingAllPrinters`|
177
+
| 7371-7385 | Surgical DOM update of online badges (grid card + side card) |`ffgRefreshOnlineUI`, `renderFfgOnlineBadge`|
178
+
| 7386-7450 |**Polling lifecycle** — `ffgConnect` opens a 2 s `setInterval`, `ffgDisconnect` tears it down. Capped exponential backoff on offline. |`ffgConnect`, `ffgDisconnect`, `ffgScheduleReconnect`|
179
+
| 7451-7510 |**`ffgPollOnce`** — single `fetch` POST `/detail`, parses JSON, dispatches to `ffgMergeStatus`|`ffgPollOnce`|
180
+
| 7511-7650 |**`ffgMergeStatus`** — full `/detail` parser. Error contract (-2 / sn / pwd), then field extraction (temps, filament matlStation vs indep, print job, camera). Throttles SN/password toasts to one per session per printer. |`ffgMergeStatus`, `ffgWarnOnce`|
181
+
| 7651-7670 | rAF-coalesced re-renders. Full re-render on status change (camera swap), live-only on data change. |`ffgNotifyChange`|
| 7961-8050 | Click delegation on vendor / material lists + colour grid + native colour picker overlay ||
186
+
| 8051-8345 |**Apply (`POST /control`)** — branches on matlStation vs independent extruder. Optimistic local patch of `conn.data.filaments` so the colour square updates immediately. |`$("ffgFilEditSave") click`|
187
+
188
+
Wiring (cross-cutting with Snapmaker):
189
+
-`renderPrintersView` (L5300+) emits `renderFfgOnlineBadge` and triggers `ffgPingPrinter` for FlashForge cards.
0 commit comments