Commit graph

6 commits

Author SHA1 Message Date
Mae PUGIN
3e54361d0d refactor: Modularize main.rs (2478 → 58 lines), flat architecture
Split monolithic main.rs into domain modules:
- context.rs: AppContext shared state, BgMsg enum, serial_spawn helper
- models.rs: UI model builders, keycap labels, key entries, layout preview
- config.rs: keyboard config export/import via binary protocol
- dispatch.rs: BgMsg handler + WPM/layout timers
- keymap.rs: key selection, layer switch/rename, heatmap toggle
- key_selector.rs: dispatch_keycode router, apply_keycode, hex/MT/LT
- macros.rs: macro CRUD, shortcut presets, step builder
- advanced.rs: combos, KO, leaders, tap dance, BT, tama, autoshift
- settings.rs: OTA flash, config backup, keyboard layout
- flasher.rs: ESP32 bootloader flash
- layout.rs: layout JSON preview, load/export
- connection.rs: serial connect/disconnect, tab auto-refresh
- stats.rs: stats refresh

Rename logic/ → protocol/ with cleaner file names.
Remove unused original-src/ directory.
Fix DarkLineEdit double styling, add rename popup, macro shortcuts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 12:02:22 +02:00
Mae PUGIN
ddcb6c6e8f fix: Layer rename targets active layer + rename field width
- active-layer property now updated on switch_layer callback
  (rename was always targeting layer 0)
- Rename input constrained to 85px max-width (no overflow)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 16:10:00 +02:00
Mae PUGIN
0813e8531f fix: Auto-slot macros + heatmap auto-load on toggle
- Macro slot auto-assigned from macros.len() (no manual slot selection)
- Heatmap toggle auto-loads KEYSTATS? from firmware
- Debug logs for macro save/refresh

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 12:23:34 +02:00
Mae PUGIN
d69b421590 style: DarkLineEdit + scrollable layer sidebar
- DarkLineEdit: wrapper around std LineEdit with Dracula theme
  (dark bg, purple focus border)
- Replaced all remaining std LineEdit in: tab_keymap, tab_macros,
  tab_flasher, key_selector
- Layer sidebar: wrapped in Flickable for scrolling with many layers
- Zero std-widgets visual components remaining (except LineEdit
  inside DarkLineEdit wrapper)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 12:04:13 +02:00
Mae PUGIN
28fbf10b79 style: Replace all std Button with custom DarkButton (Dracula theme)
Custom DarkButton component with Dracula theme colors:
- bg-secondary base, button-hover on hover
- primary variant with accent-purple
- Disabled state with reduced opacity
- Consistent 28px height, 4px border-radius

Also fixes PickDarkButton/KeyDarkButton naming errors from agent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 20:52:44 +02:00
Mae PUGIN
32ee3a6d26 feat: Complete KeSp Controller — Slint UI port
Full port of the KaSe/KeSp split keyboard configurator from egui to Slint:
- 6 tabs: Keymap, Advanced, Macros, Stats, Settings, Flash
- Responsive keyboard view with scale-to-fit and key rotations
- Key selector popup with categorized grid, MT/LT builders, hex input
- Combo key picker with inline keyboard visual
- Macro step builder with visual tags
- Serial communication via background threads + mpsc polling
- Heatmap overlay with blue-yellow-red gradient
- OTA flasher with prog port VID filtering and partition selector
- WPM polling, Tamagotchi, Autoshift controls
- Dracula theme matching egui version

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 20:40:34 +02:00