Skip to content

Paperframe: EE02-only, rebrand, fixed-grid status overlay - #34

Merged
sven97 merged 11 commits into
mainfrom
paperframe-ee02-only-status-redesign
Sep 10, 2026
Merged

sven97 merged 11 commits into
mainfrom
paperframe-ee02-only-status-redesign

Conversation

@sven97

@sven97 sven97 commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Rebrands Hello ePaper → Paperframe, drops all boards except the EE02, and replaces the multi-panel status renderer with a fixed 12-column overlay card. Design + plan: docs/superpowers/specs/2026-09-09-paperframe-ee02-only-status-redesign-design.md.

EE02-only

  • platformio.ini: deleted ee03/ee04/ee05 envs, folded xiao_base into env:ee02; CI matrix + publish reduced to ee02.
  • Removed every board conditional: PANEL_NATIVE_LANDSCAPE, initPanelColorMode(), the gray/BWRY dither branches, the combo-table rotation logic. Panel is now compile-time constants (PANEL_W/H/DESC).
  • layout_math.h gutted to grid geometry — the font ladders, fitSize, shrink pass, QR-scale search and reduction cascade are gone.

Status screen

  • Now a centred 960×1056 card drawn over the retained image, not a full-screen page. drawFrameScreen() fills only the card; the caller paints renderCachedPhoto() (or white) behind it. KEY1 opens/closes it with no fetch.
  • Fixed 12-col grid (50px cols, 24px gutters, 48px padding); 4 type styles (Bold 24/18/12, Reg 12).
  • Adds: relative "next refresh" (in 2h 15m / Pinned / Paused until 07:00), IP fallback line, MAC-derived device ID (PF-XXXX), panel spec + 6-colour self-test swatch. Version line shows FW_BUILD_NUMBER.
  • Onboarding and error states share the same renderer via ScreenState.
  • Error card now distinguishes Wi-Fi failure from image-source failure (ErrorKind): a Wi-Fi error blanks the signal row and says "Wi-Fi problem"; an image error keeps the real SSID/signal and says "Image source problem". The 6h-outage escalation carries the kind too.

Rebrand

  • "Paperframe" as the product name; AP Paperframe-Setup, default device name paperframe. Existing devices keep their stored name (default-only change).
  • OTA URLs point at sven97/paperframe (repo being renamed alongside this merge).
  • README rewritten for the single board; docs/panel-combos.md removed; docs/hardware-checklist.md + docs/versioning.md updated.

Verification

  • pio test -e native: 122 passing (rewrote test_layout_math + test_status_content).
  • pio run -e ee02: clean.
  • Flashed and confirmed on the real EE02: status card over the photo, onboarding path, both error kinds, relative countdown across a sleep cycle, OTA peek still comparing build numbers. Screenshots in the session.

https://claude.ai/code/session_01TXdtnL32TwrhYFqmEGRKRD

- platformio.ini: delete ee03/ee04/ee05 envs, fold xiao_base into env:ee02
- config.h: hard-code EE02 identity (AP_NAME "Paperframe-Setup",
  DEFAULT_DEVICE_NAME "paperframe", BOARD_MODEL "EE02"), add
  PANEL_W/PANEL_H/PANEL_DESC; drop the per-board #ifndef fallbacks
- ci.yml: build matrix and publish step reduced to ee02 only

Design: docs/superpowers/specs/2026-09-09-paperframe-ee02-only-status-redesign-design.md

Claude-Session: https://claude.ai/code/session_01TXdtnL32TwrhYFqmEGRKRD
- display.h/.cpp: remove PANEL_NATIVE_LANDSCAPE; PortraitScope is now a
  no-op (panel is portrait-native); delete initPanelColorMode(); PALETTE
  is unconditionally the Spectra-6 six-colour set
- main.cpp: drop the initPanelColorMode() call
- portal.cpp: rotOptions() uses a fixed portrait-native label table

Claude-Session: https://claude.ai/code/session_01TXdtnL32TwrhYFqmEGRKRD
- layout_math.h: gutted to grid constants (GRID_*, 12 cols / 24px gutter
  / 48px pad), gridColX/gridSpanW, and qrScaleForBox. Font ladders,
  fitSize, shrink pass, computeFit, and the reduction cascade are gone.
- status_content.h: buildStatusData(state, content, buildNumber, apName,
  panelDesc, w, h) -> flat StatusData of resolved per-zone strings; plus
  formatNextRefresh() (Pinned / Paused until HH:00 / in Xh Ym) and
  deviceIdFromMac(). ScreenContent trimmed (no voltage / lastFetch;
  adds lastIp, deviceId).
- both native test files rewritten for the new geometry + builder.

pio test -e native: 121 passing. pio run -e ee02 fails here as planned
(ui.cpp still on the old API) -- fixed in Task 4.

Claude-Session: https://claude.ai/code/session_01TXdtnL32TwrhYFqmEGRKRD
- ui.cpp: drawFrameScreen() rewritten to place each zone at a fixed
  column span (header / status band / action / device / legend), draw
  the 2px rounded window frame, and render the Spectra-6 colour swatch.
  Role->font is a fixed map; the fitScreen/fontFor/drawFittedText
  machinery is gone. gatherLiveContent() drops voltage + last-fetch,
  adds lastIp + efuse-MAC device ID + the relative next-refresh string.
  Version line now shows FW_BUILD_NUMBER.
- net.cpp / display.cpp wrappers: let buildStatusData() supply the
  onboarding/error wording; fill deviceId.
- icons.h: drop the unused ICON_NEXT (+ its test assertion).

pio run -e ee02 + pio test -e native (121) both green.

Claude-Session: https://claude.ai/code/session_01TXdtnL32TwrhYFqmEGRKRD
- main.cpp header comment -> Paperframe
- README.md: retitled, cut to the single EE02 board, updated buttons
  (Refresh image), setup (Paperframe-Setup), device-name default
  (paperframe), build commands, source layout
- docs/versioning.md: note the status screen shows FW_BUILD_NUMBER
- docs/hardware-checklist.md: rewritten for the redesigned status page
  and the EE02-only scope; EE03/04/05 section removed
- docs/panel-combos.md deleted
- docs/img/status-page-mockup.png: the Paperframe design

(portal_html.h already uses the device name, not a brand string.)

Claude-Session: https://claude.ai/code/session_01TXdtnL32TwrhYFqmEGRKRD
Per hardware review: the status/onboarding/error screen is now a centred
960x1056 rounded card drawn *over* the retained image. KEY1 toggles the
card without changing what's displayed (portal exit already re-renders
the cached image, no fetch).

- layout_math.h: GRID_WIN 960x1056, centred (GRID_MARGIN_X/Y); 12 cols
  @ 50px + 24px gutter -> 864 content; tighter GRID_ZONE_PAD
- ui.cpp: drawFrameScreen() no longer fillScreen()s -- it fillRoundRect()s
  just the card. drawStatusScreen() paints renderCachedPhoto() (or white)
  as the background first.
- display.cpp showError / net.cpp showProvisioningScreen: same background
  paint before the overlay.
- test_layout_math: card-centred assertion updated for the new geometry.

Verified on the real EE02 via /current: card renders correctly over the
photo, all zones intact.

Claude-Session: https://claude.ai/code/session_01TXdtnL32TwrhYFqmEGRKRD
…line

1. Wi-Fi row is now just the signal-bars icon + SSID -- the "Strong
   signal" text was redundant with the icon.
2. Font faces 5 -> 4: Title (Bold 24), Value (Bold 18), Heading (Bold 12),
   Body (Reg 12). Dropped Reg 9pt -- version line + zone labels are Body
   now. (Value stays 18pt, not merged into Title: "Paused until 07:00"
   clips the left column at 24pt.)
3. iconRow() helper sets label text with ML_DATUM at the icon's vertical
   centre, so icon + label line up regardless of font size; battery and
   Wi-Fi rows share one layout; the left "next refresh" block is centred
   against the right column.

Verified on the real EE02.

Claude-Session: https://claude.ai/code/session_01TXdtnL32TwrhYFqmEGRKRD
A network error and an image-fetch error rendered identically, and the
Wi-Fi row always said "Connection failed" even when Wi-Fi was up and the
image server was the problem -- pointing the user at the wrong thing.

- status_content.h: ErrorKind { Wifi, Image } on ScreenContent; the Error
  branch of buildStatusData() splits:
    Wifi  -> "Wi-Fi problem",  blanked signal row, "check your network"
    Image -> "Image source problem", real SSID + signal kept, "check the
             URL in settings"
- display.cpp showError(msg, kind): only blanks the signal row for Wifi.
- main.cpp: the 5 call sites pass the kind they already know
  (connectWifi fail -> Wifi, fetchImage fail -> Image). The 6h-outage
  escalation (maybeShowStuckError) now also carries the kind and says
  "Image fetch has failed for over 6h" when that's the actual cause.
- tests: split the Error case into wifi-kind / image-kind.

Verified on the real EE02: image-error card shows "Image source problem"
+ live "FUIYOH" signal row, distinct from the Wi-Fi error card.

Claude-Session: https://claude.ai/code/session_01TXdtnL32TwrhYFqmEGRKRD
The rolling firmware-latest release moves with the repo rename. GitHub
redirects the old path, so already-deployed boards still self-update and
pick up this corrected URL on the next pull.

Claude-Session: https://claude.ai/code/session_01TXdtnL32TwrhYFqmEGRKRD
@sven97
sven97 merged commit 153364e into main Sep 10, 2026
2 checks passed
@sven97
sven97 deleted the paperframe-ee02-only-status-redesign branch September 10, 2026 04:35
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