GLDeck Render ABI Migration — Handoff Report
==============================================
Date: 2026-07-29
Working tree: /home/johnny/projects/gldoze (master, intentionally dirty)

Files changed
-------------
  apps/plugins/gldeck/gldeck_plugin.cpp   (2316 → 2884 lines)
  apps/plugins/gldeck/app.json.in          (removed "Preview" from name)

No commits made — gldeck/ is untracked and the worktree has pre-existing
dirty changes that must be preserved.

Renderer repairs completed
--------------------------
1. Text tint: TexVertex now carries per-vertex r,g,b,a. kTexVS passes
   aColor through; kTexFS outputs vec4(vColor.rgb, vColor.a * sampled_alpha).
   DrawText stores the caller-supplied colour in every glyph vertex.

2. Sampler lifecycle: LinearSampler is created BEFORE the font bind group.
   DestroyResources now destroys in reverse dependency order with no
   duplicate TexBGL destroy.

3. Format consistency: Both SolidPipeline and TexPipeline now request
   RGBA8_UNORM, matching the host's render target format (verified in
   desktop_plugin_host.cpp:717).

4. Error handling: InitResources now checks sampler creation, reports
   failures via Log(), and returns false on fatal errors. DestroyResources
   is safe against partial initialization.

5. Shared layout: LayoutRects struct computes all panel/list/button rects
   from (width, height). Both RenderFrame and HandleEvent/HitTestControl
   use the same LayoutRects::Compute() — no duplicated pixel values.

Features ported
---------------
1. Playlist operation
   - Tab rendering with active/hover states, scroll left/right buttons
   - Tab click switches playlist, saves/restores queue
   - Add-tab button creates new playlist
   - Playlist rows with selection highlight, track names
   - Undo/redo (Ctrl+Z/Ctrl+Y) with full history
   - All persistence (playlist catalog, playback options, session state)

2. Media transport
   - Play/Pause, Stop, Previous, Next, Shuffle, Loop buttons
   - Seek bar with fill based on current position
   - Volume slider with fill
   - Keyboard: Space=play/pause, S=stop, N=next, P=prev, +/-=volume, M=mute
   - Arrow keys for seek (±5s), Up/Down for track navigation, Enter to play
   - Now-playing label with current track name

3. Library/file browser
   - Async filesystem listing via Host API (filesystem_list_begin + polling)
   - Directory/parent/audio-file differentiation (blue dirs, white files)
   - Double-click navigation into directories
   - Double-click enqueue of audio files
   - Browser scroll offset with mouse wheel support
   - Favourite path display

4. Radio
   - Radio mode toggle shows station list in playlist pane
   - Station list with selection highlight
   - Radio control buttons (Play, Stop, Favourite, Delete, Rename, Record)
   - Radio station selection and playback via SubmitRadioQueue
   - All radio station persistence

5. Equalizer
   - 10-band visual EQ sliders rendered in the browser EQ area
   - Vertical slider interaction (click/drag to set gain -18..+18 dB)
   - Band labels and gain value display
   - Enable/disable toggle
   - EQ state persistence and application via media_set_equalizer

6. Interaction
   - Hover feedback on all interactive controls (ControlID enum + HitTest)
   - POINTER_MOVE tracking updates HoveredControl
   - Pointer down handling with proper control identification
   - Mouse wheel scrolling for both playlist and browser panes
   - Double-click detection for playlist rows and browser entries

7. Visual quality
   - Theme colours matching native GLDeck (dark panels, green headers, etc.)
   - Button hover/pressed/active states with distinct colours
   - Selected row highlighting
   - Proper text rendering with tinted glyphs at correct sizes
   - Panel borders, separators, and depth layering

Build & test results
--------------------
  cmake --build build-cef --target gldoze_gldeck gldoze_desktop -j2
  → CLEAN BUILD (exit 0)

  ctest --test-dir build-cef -R 'render_abi|render_abi_integration|
        service_acquisition|desktop_plugin_host_boundary|window_events|
        gldeck_playlist_model' --output-on-failure
  → 6/6 PASSED

  scripts/verify_cef_runtime.sh build-cef
  → PASSED (chrome-sandbox dev warning is expected)

Remaining limitations
---------------------
1. Radio rename and recording require host dialog support not yet exposed
   through the plugin ABI (noted as TODO in code).

2. Spectrum analyzer not implemented (would require audio FFT data from
   host, not available through current ABI).

3. Context menus (right-click) not implemented — would need a host-provided
   popup/menu API.

4. Playlist rename/delete via in-place text input not implemented — would
   need host text input overlay or ABI extension.

5. Drag-and-drop not implemented.

6. No visual testing performed — the live desktop was not restarted per
   instructions. A fresh authorized screenshot is needed to confirm visual
   parity.

Live desktop status
-------------------
The built gldoze_gldeck.so is at build-cef/apps/gldeck/libgldoze_gldeck.so.
The live desktop needs a restart (or Plugin Manager reload) to load the
new artifact. This was NOT done per explicit instruction to request
permission first.
