Commit Graph

252 Commits

Author SHA1 Message Date
gramps 9b56e88800 Revert ab29ec8: container==content auto-fit made it worse — back to alpha-crop with the container at element size
The container tracks the element's own Width/Height again; the crop stays in the bitmap.
2026-08-28 12:09:13 -07:00
gramps ab29ec801d Web source: container == content — element grid + selection box sized to the cropped frame's canvas extent
- FindContentBounds already trimmed the bitmap; the grid/box still rendered at the uncropped user
  size, so Fill stretched the tight widget into a bigger frame = dead-between-content-and-border.
- ContentCanvasSize maps the crop rect to canvas units (1920/pixW per axis, DPI-correct) and the
  preview event now carries (bitmap, canvasW, canvasH).
- OnWebView2PreviewBitmapChanged sets the element Width/Height to that size; the grid and the
  SelectionOverlay (both bound to the element's Width/Height) now equal the widget exactly.
- IsPreviewDragging (set in MainWindow drag/resize) suppresses auto-fit mid-gesture.
- Tests 10/10 (alpha bounds, canvas-size mapping incl. DPI, control size); 0 warnings.
2026-08-28 12:08:04 -07:00
gramps bccdb4892c Web source: crop to the frame's ALPHA bounding box — the widget's true rendered extent, no DOM timing, can't break the render
- FindContentBounds scans the Bgra32 capture for the bounding box of non-transparent pixels
  (background is injected transparent, so alpha = widget extent). Crop to that rect + Stretch=Fill
  maps the widget flush under the selection box: full-canvas widgets fall through to the full frame
  (identical to the confirmed-good image); floating widgets get tight-fitted with no dead space.
- Removes QueryContentBoundsAsync + the JS script entirely — the DOM-union attempt (a5b9952) broke
  rendering by measuring an unsettled layout on NavigationCompleted; alpha measurement is immune.
- 3 new unit tests: tight box, no-alpha no-crop, full-alpha no-crop. 7/7 pass, 0 warnings.
2026-08-28 11:53:36 -07:00
gramps 5348b5c480 Revert web render to the creator-verified-good base (70fe2b8): full-frame capture, no crop, plain Stretch=Fill
The wrapper-excluded content-union crop measured an unsettled layout on NavigationCompleted
(async fonts/images, load animations) and produced a broken/zoomed sliver — the image was gone.
Restoring the exact confirmed-good pipeline; the bounding-box dead-space problem stays open and
will not be touched without explicit approval.
2026-08-28 11:49:21 -07:00
gramps a5b9952cbd Web source: crop to the WIDGET rect (visible-element union excluding full-viewport wrappers) — kills the ghost-boundary dead space
- scrollWidth/scrollHeight returns the whole 1920x1080 canvas for widgets whose body/background
  spans it, so the crop kept massive transparent margins and the content floated in the Fill box.
- ContentBoundsScript now unions every visible element's getBoundingClientRect, excluding elements
  that span >=98% of the viewport (bodies, full-canvas background layers); full-bleed widgets fall
  back to the full rect. Crop taken AT the rect's top-left (l,t) — content pins to bitmap (0,0).
- Web Image explicitly Margin=0 + Left/Top alignment so the frame and widget coincide at the origin.
- Canvas-size render untouched.
2026-08-28 11:45:31 -07:00
gramps b862a0fb04 Web source: revert crop measurement to f39ebd9 scrollWidth/Height (nailed right/bottom) — canvas-size render untouched
- ContentBoundsScript back to scrollWidth/scrollHeight extents, kept as a real JS object
  (the JSON.stringify double-encode bug that silently disabled the crop stays fixed).
- Crop again from (0,0), no X/Y offset. The union-of-elements approach (582d1f4) created an
  all-sides gap by including invisible full-canvas wrappers; revert to the proven code.
2026-08-28 11:35:30 -07:00
gramps 2e60ca3b2c Restore MyMistakes.md to tracking — committed locally, never pushed 2026-08-28 11:29:38 -07:00
gramps c8cf4156a1 Gitignore MyMistakes.md — local working log, not version-controlled 2026-08-28 11:29:27 -07:00
gramps cdbf8ac790 Add MyMistakes.md — per-task failure log for the web bounding-box task (updated before every commit, truncated on completion+push) 2026-08-28 11:28:59 -07:00
gramps 582d1f4b0f Web source: crop to the widget's true content rect (union of visible body elements) — bounding box tight on all four sides, pinned to (0,0)
- QueryContentBoundsAsync now returns a real JS object (not JSON.stringify — ExecuteScriptAsync
  double-encodes strings, which silently killed the old crop) and measures the union of every
  visible body element's getBoundingClientRect: the widget's actual rect, top-left offset included.
- CaptureFrame crops AT that offset (x,y) instead of from (0,0), so the widget anchors at origin
  and the box is flush on right/bottom. Fill maps the frame flush under the box.
2026-08-28 11:25:06 -07:00
gramps 70fe2b80b2 Web source: render at canvas size 1920x1080 — full-bleed widgets no longer truncated to upper-left 2026-08-28 11:16:46 -07:00
gramps f39ebd96ce Web source: crop capture to actual content bounds (anchor 0,0); slider click-to-position; web URI X clears; tab order 2026-08-28 11:10:49 -07:00
gramps 23874c2dd6 Web source: stable viewport (snapshot at register) + Stretch=Fill + overflow:hidden — no reflow, no scrollbars, no dead space 2026-08-28 10:56:23 -07:00
gramps 8d793af91a Web source: geometry-agnostic viewport==box model — viewport locked to element box, Stretch=Fill, no dead space 2026-08-28 10:48:53 -07:00
gramps 9d4103c44b Web source: CSS reset per document + (0,0) anchor — kill box-vs-content padding 2026-08-28 10:41:33 -07:00
gramps e917c41a48 Web source: fix rendering — fixed 1920×1080 viewport (OBS pattern), Stretch=Uniform, startup registration 2026-08-28 10:23:59 -07:00
gramps fd6e02b687 Web source: off-screen WebView2 capture + layout persistence + transparent bg
Bundle exception (2026-08-27): this lands prior-session work plus today's
transparency fix as one commit per creator instruction.

WebView2Manager (new): off-screen WebView2 control parked at -5000/-5000 in
the window's visual tree, captures via CapturePreviewAsync every 100 ms into
a BGRA8 VideoFrame. Source Width/Height sync to the control via
PropertyChanged. JS transparent-background injection runs on every
NavigationStarting/NavigationCompleted so the page's own CSS does not paint
white over the capture.

Transparency fix: DefaultBackgroundColor = System.Drawing.Color.Transparent
set on the WPF control before EnsureCoreWebView2Async. The WPF SDK doc says
the value is forwarded to the controller on init; the IDL (ICoreWebView2-
Controller2) confirms alpha=0 makes the capture alpha-preserving. The
prior-session 'CoreWebView2.BackgroundColor' path was the wrong property
name and has been replaced.

LayoutStore: WebUri column added (idempotent ALTER TABLE) and round-tripped
on save/load (schema v11).

MainViewModel: WebView2Manager constructed on Loaded; loaded web sources
re-registered; Source.WebUri PropertyChanged forwards to manager.

MainWindow: off-screen host Canvas added to visual tree.

Tests: 3 scale-sync + WebView2_DefaultBackgroundColor_Is_Transparent +
LayoutStorePersistenceTests.WebSource_WebUri_Persists. 234/236 pass
(2 pre-existing failures unchanged).

Scale bug (DPI/physical-pixel mismatch) still open.
2026-08-27 08:52:39 -07:00
gramps f81048849a Scope Lock: pre-task declaration, git history scan, pre-commit audit script 2026-08-26 09:58:33 -07:00
gramps 67baac6fdd Rename pull-out tab to 'Stream Settings'; right-click Start Stream → Change Account / Logout 2026-08-26 09:35:07 -07:00
gramps d4aa5e1003 Thumbnail strip: show hotkey label next to each scene name 2026-08-26 08:28:48 -07:00
gramps 3a1484b3c5 TASK 20 step 2: hotkey config UI + modifier chord persistence + conflict detection 2026-08-26 06:48:14 -07:00
gramps 89ab83be2e Update Broadcast button: diff before push, offline=local only, live=API; Go Live empty-field prompt 2026-08-25 17:25:25 -07:00
gramps add024a68d HANDOFF: session state, event-button task queued, no-push rule 2026-08-24 15:37:03 -07:00
gramps 100980087e Fix Run-crash for real (type-guard before VisualTreeHelper); avatar via HttpClient decode 2026-08-24 14:57:34 -07:00
gramps d9e352f996 Text tab toggles the drawer; click-away collapses it 2026-08-24 14:49:15 -07:00
gramps e6baa55867 Fix logo-click crash (Run is not a Visual); Text tab always visible; avatar initial fallback 2026-08-24 14:44:16 -07:00
gramps b988e6d72e Broadcast Text pull-out (Live screen) + launch geometry 1920x1040/1366x768 with restore 2026-08-24 11:04:41 -07:00
gramps d5b611d8d5 ON-AIR label matches REC: shared StatusSignText style, dots carry state 2026-08-24 10:30:18 -07:00
gramps 7357836f9b ON-AIR sign right of REC: gray offline, red public, green private 2026-08-24 10:22:18 -07:00
gramps b0bace7432 TASK 20 step 1: global hotkeys F1-F9 (scenes, stream, mutes, TRAX) 2026-08-24 09:32:54 -07:00
gramps b899ff053f No feature branches pre-1.0: all work on main 2026-08-24 09:15:56 -07:00
gramps 708b336da7 YouTube Chat layer: one-per-layout gate + legacy label heal (TASK 27) 2026-08-24 09:08:03 -07:00
gramps ef710c5537 Webcam menu gates on the app-wide identity (TASK 26) 2026-08-24 08:56:17 -07:00
gramps d774799138 HANDOFF: TASK 25 committed and pushed 2026-08-23 13:34:49 -07:00
gramps 7dd140a4c0 Backgrounds: one locked Background per screen + mini rule (TASK 25) 2026-08-23 13:33:33 -07:00
gramps b400ab59c5 Toasts: non-blocking notifications replace MessageBoxes + log-only failures (TASK 24) 2026-08-23 12:25:04 -07:00
gramps 809c066184 Fix: derive IsBackground from Type on layout load (legacy rows healed) 2026-08-23 07:25:54 -07:00
gramps 46da9954ad HANDOFF: session state, open IsBackground-on-load bug, audit verdict 2026-08-23 06:26:29 -07:00
gramps d2114c7e1c the ai is an overthinking fucking moron who needs it's plug pulled until such time it can repeat a similar action with its head and ass 2026-08-23 06:25:38 -07:00
gramps b74f15ff14 Fix: IsBackground derived from SourceType + per-scene background property tests
- Source.Type setter auto-sets IsBackground = true when Type is Background
- SceneElement.IsBackground: expression-bodied → virtual auto-property
- Source.IsBackground: new → override (WPF binding fix)
- Three new tests: IsBackground per-scene, derived from type, UseDefaultBackground default
2026-08-22 18:16:11 -07:00
gramps bb7f99a747 HANDOFF: reflect committed state 2026-08-22 18:11:24 -07:00
gramps 4b9a8e515f Control Surface UX: pill toggle, background rename, per-scene properties
- Sliding pill toggle (green ON / red OFF) replaces checkbox
- Geometry mismatch error for custom backgrounds
- Backdrop -> Background: C# rename, SQL column rename with migration
- Source.IsBackground: new -> override (fixes WPF binding)
- Legacy 'Backdrop' display name migrated to 'Background'
- Per-scene UseDefaultBackground + CustomBackgroundPath
- Asset files renamed backdrop -> background
- StagedScene/LiveScene split, thumbnail strip, edit gating
- TransitionService (Cut/Fade/Move)
- Context menu: Capture Desktop, Refresh Desktop
- Resolution badge removed, ON-AIR status light added
2026-08-22 18:10:59 -07:00
gramps e06bfa42a8 Fix: TRAX meter reflection — remove double attenuation from slider+loopback 2026-08-21 08:32:20 -07:00
gramps 75ee6978d3 HANDOFF: reflect pushed state 2026-08-21 08:19:22 -07:00
gramps 8951141c65 TASK 10: Polar billing + Velopack auto-updates (steps 1-7) 2026-08-21 08:18:52 -07:00
gramps 2f135687cd fix: countdown timer panel showing under webcam properties
Same root cause as IsChatBox — SourceType binding fails on WebcamSceneConfig,
WPF defaults Visibility to Visible without calling the converter.
Added virtual bool IsCountdown on SceneElement, override in Source.
Swapped binding to BoolToVis. Removed dead SourceTypeToVisibility converters.
2026-08-20 18:13:31 -07:00
gramps 7e01c4564e fix: chatbox properties panel showing when webcam is selected
SceneElement was missing virtual IsChatBox property (unlike IsWebcam, IsWebSource, IsImageSource).
WPF binding failed silently when SelectedElement was a webcam, defaulting StackPanel to Visible.
Added virtual bool IsChatBox => false on SceneElement, made Source.IsChatBox override it.
2026-08-20 18:07:53 -07:00
gramps 0bd17ab428 feat(ui): Show Desktop toggle, avatar login, chat preview, backdrop seeding, border animations
- Source.ShowDesktop bool persisted in DB (schema migration + LayoutStore)
- ClearBackdropCaptureAsync clears CaptureKey + VideoImageSource for static fallback
- Top bar: red/green/pulsing status light, avatar via BitmapImage, Log In button
- ShowStartStream now requires IsConnected
- RunMockChatPreviewAsync: simple async loop, ChatPreviewEnabled property on Source
- EnsureDefaultBackdrop called on every scene switch, seeds all 5 scenes
- SeedEndingBackdrop replaces existing, SeedChatBackdrop added
- SceneCatalog: Chat scene display name corrected (layer = 'YouTube Chat')
- Left panel spacing consistency, context menu reordered
- Border animation rendering via code-behind Storyboard approach
- 3 new backdrop assets (ending-backdrop.jpg, chat-backdrop.jpg, live-backdrop.jpg)
- Build 0 warnings, 178 tests passing
2026-08-20 18:02:41 -07:00
gramps a76a3d2acd fix: BRB backdrop seed replaces existing instead of skipping
SeedBrbBackdrop() now updates the AssetId on an existing Background
source instead of bailing when one already exists. This ensures the
new brb-backdrop.jpg replaces any old image already in the DB.
2026-08-19 15:02:47 -07:00
gramps f40ec83e69 feat: BRB backdrop seed + docs refresh + Polar org ID
- Add brb-backdrop.jpg asset, SeedBrbBackdrop() mirrors Starting pattern
- Update HANDOFF.md (was stale), TASKS.md (TASK 10 ready, TASK 15 2/5), ai.md (org ID)
- Polar org ID c05fb364 obtained via OAT, recorded in CREDENTIALS.md
2026-08-19 15:01:23 -07:00