Skip to content

feat: Add hub-wide live toggle and real-time intensity graph#201

Merged
hhvrc merged 11 commits into
developfrom
feature/live-control-touchup
May 19, 2026
Merged

feat: Add hub-wide live toggle and real-time intensity graph#201
hhvrc merged 11 commits into
developfrom
feature/live-control-touchup

Conversation

@LucHeart
Copy link
Copy Markdown
Member

No description provided.

@LucHeart LucHeart requested a review from hhvrc May 19, 2026 00:45
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10f4a10230

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib/state/live-control-state.svelte.ts Outdated
When registerHubShockers removed a shocker that was still live (e.g. the
hub list refreshed without it, or shared permissions.live flipped off),
its isLive flag was dropped without going through disconnect. The tick
loop and WebSocket stayed open with nothing to send until the hub itself
unmounted. Clear the removed entry's runtime state and disconnect when
no live shockers remain.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 19, 2026

Deploying openshockapp with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7c145b8
Status:⚡️  Build in progress...

View logs

claude and others added 2 commits May 19, 2026 00:59
- Drop the SUBSTEPS=1 smoothstep loop in LiveSlider: with one substep
  the eased curve collapsed to a straight lineTo, so the inner loop was
  dead work. Use a direct lineTo per sample.
- Initialise the smoothing accumulator from the current intensity on
  mount so the line does not ramp up from zero when the component
  appears mid-session.
- Re-read the stroke color from computed style each frame so the graph
  follows theme changes without remounting.
- Spell out the ctrl-click action in the LiveButton tooltip so users
  see whether it will start or stop the hub from the current state.
Comment thread src/routes/+layout.svelte Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors and extends the “live control” UI/state flow by centralizing hub/shocker registration in the live-control store, simplifying LiveButton usage, and enhancing the live intensity slider visualization.

Changes:

  • Introduces hub-level shocker registration (registerHubShockers) and pause-state tracking in the live-control state store.
  • Simplifies LiveButton call sites by deriving connection/shocker state internally and adds hub-wide start/stop via ctrl/meta click.
  • Updates UI: adds a global tooltip provider wrapper and replaces the live slider “fill” with a canvas-based intensity history graph.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/routes/shares/public/[shareId=guid]/ControlView.svelte Uses registerHubShockers and simplifies LiveButton props; tooltip markup adjusted.
src/routes/+layout.svelte Wraps app layout in a Tooltip.Provider with delayDuration.
src/routes/(app)/shockers/shared/+page.svelte Registers live-capable shockers via registerHubShockers; simplifies LiveButton props.
src/routes/(app)/shockers/own/+page.svelte Registers hub shockers via registerHubShockers; simplifies LiveButton props.
src/lib/state/live-control-state.svelte.ts Adds per-shocker pause state, hub shocker registration, and hub-wide live toggling API.
src/lib/components/ControlModules/LiveButton.svelte Derives connection/state internally; adds tooltip and ctrl/meta hub toggle behavior.
src/lib/components/ControlModules/impl/LiveSlider.svelte Adds canvas-rendered intensity history graph driven by an animation loop.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib/components/ControlModules/LiveButton.svelte
Comment thread src/routes/+layout.svelte Outdated
Comment thread src/lib/components/ControlModules/impl/LiveSlider.svelte
@hhvrc hhvrc changed the title Feature/live control touchup feat: Add hub-wide live toggle and real-time intensity graph May 19, 2026
@hhvrc hhvrc merged commit e9bbf5a into develop May 19, 2026
9 of 10 checks passed
@hhvrc hhvrc deleted the feature/live-control-touchup branch May 19, 2026 18:38
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.

4 participants