Skip to content

Plugin: diagnostics report, decode counters, and say when the green screen is on - #122

Merged
MyNamesEMurray merged 3 commits into
mainfrom
claude/diagnostics-report
Sep 8, 2026
Merged

MyNamesEMurray merged 3 commits into
mainfrom
claude/diagnostics-report

Conversation

@MyNamesEMurray

@MyNamesEMurray MyNamesEMurray commented Sep 8, 2026

Copy link
Copy Markdown
Owner

What & why

Three commits, all aimed at the same failure: something goes wrong, the plugin
knows why, and says nothing.

1. A one-button diagnostics report

Tools → LensLink Settings → Copy a diagnostics report, GET /api/diagnostics for Qt-less builds and scripts, and a copy into the OBS log
so an uploaded log carries it either way.

Collects plugin/OBS versions, module architecture, platform and OS version,
machine and CPU, whether OBS is running translated under Rosetta, the
graphics device, plugin settings, and per-source connection state. No video, no
audio, nothing personal — stated at the top, since it's about to be pasted in
public.

tcp_dial also threw its error away, so "not reachable" covered both nothing
was listening
and the OS refused to let us try — opposite fixes, identical
appearance. It's now kept per source and reported with its meaning
(ECONNREFUSED = app closed; EPERM = macOS Local Network permission denied;
EHOSTUNREACH; ETIMEDOUT = often client isolation).

2. The decode counters

The plugin already counted video packets, keyframes, frames decoded, decode
errors and hardware-decode fallbacks per connection — but only into the log
heartbeat. They're mirrored into the health snapshot now, because their
relationship is the diagnosis:

Packets Frames decoded Means
climbing not climbing link fine, decoder stalled — a frozen or green picture
neither link dead
climbing climbing, errors rising driver rejecting the stream

3. Say when the green screen is on

A user reported the source going green and staying green through an OBS
restart and a phone restart
, then deleted the app. That is the signature of
the virtual green screen working correctly on a subject it can't find: the
phone paints everything that isn't a person chroma green, so a lost
segmentation — subject out of frame, or subject distance set too tight —
makes the whole frame background. The setting lives on the phone, which is
exactly why restarting either end changed nothing.

Nothing in OBS said so. The status read Connected: iPhone — ~60 ms while the
picture was solid green, and the only available conclusion was that the plugin
was broken. It now appends "green screen on", or, when the keying filter is
missing — deleted by the user, which this code respects forever — "green
screen on, but nothing is keying it out"
. Different problems, now different
text.

No behaviour change: no filter is added, re-added or retuned. The plugin
only stops being silent. The report carries the same fact, and the
troubleshooting page gains the symptom — including that the feature costs the
phone real work per frame, which is a plausible half of the same reporter's
"starts to lag".

How it was tested

  • Clean configure-and-build from scratch, -Wall -Wextra -Werror on both
    the C and C++ paths, with Qt6 installed so frontend-ui.cpp and the new
    button actually compiled. CI covers Windows and macOS.
  • All locale keys in the touched files resolve in en-US.ini.
  • Verified the panel's send_str loops on partial writes, since this body is
    multi-kilobyte.
  • Site: 16 pages, 0 broken links.

Not verified from here: the report's text on macOS and Windows (the
sysctl and platform branches compile only there), and the green-screen status
suffix against a live phone — this container has no OBS and no device. The
macOS block and the status wording are the two things worth a glance.

Releases

No trailer, so merging cuts a patch release. Worth shipping promptly: the
green-screen status alone turns a "this is broken, I deleted it" into a
one-line explanation.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PSuQicA9NrKWwpgzY6SvhA

Crashes already reach us — TestFlight mirrors them into issues — but the
failures that matter here are not crashes. Someone whose source sits on
"Trying to reach the phone" closes OBS and never says anything, and the
status line cannot tell them why, because the reason is thrown away one
layer down.

So: Tools → LensLink Settings → Copy a diagnostics report. It gathers what
a maintainer would otherwise have to ask for over three round trips —
plugin and OBS versions, platform, OS version, CPU and machine, the
graphics device, plugin settings, and per source the status, device,
transport, decoded totals, latency and which decode pipeline engaged. It
carries no video, no audio and nothing personal, and says so at the top.

The part that is new information rather than a convenience: tcp_dial threw
its error away, so "not reachable" covered both "nothing was listening"
and "the OS refused to let us try". Those have opposite fixes and looked
identical. The error is now kept per source and reported with its meaning
— ECONNREFUSED means the app is closed; EPERM on macOS means OBS has not
been granted Local Network access, which is a plausible and otherwise
invisible cause of "it just doesn't work on my Mac".

Two surfaces, because Qt is not everywhere: a button in the settings
dialog that copies and logs, and GET /api/diagnostics on the browser panel
for `curl` and for builds without the frontend UI. The report also goes to
the OBS log, so an uploaded log carries it whether or not anyone pressed
the button.

Verified: builds clean on Linux with -Wall -Wextra -Werror, both with and
without Qt6 (so both the C and the C++ path compiled); all 54 locale keys
resolve; the panel's send loop handles a multi-kilobyte body.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PSuQicA9NrKWwpgzY6SvhA
"It randomly stops working, and sometimes it's just a green screen" is two
different failures wearing the same face, and the report as written could
not tell them apart.

The plugin already counts what separates them, per connection: video
packets, keyframes, frames the decoder actually produced, decode errors,
and hardware-decode fallbacks. Until now they only reached the log
heartbeat. They are mirrored into the health snapshot once a second, like
the frame and byte totals beside them, and the report prints them together
because the reading is in their relationship:

  packets climbing, frames not     the link is fine, the decoder stalled —
                                   a picture that froze or went green
  neither climbing                 the link is dead
  decode errors climbing           the driver is rejecting this stream
  hw retries > 0                   hardware decode already fell back

The one case worth calling out — packets arrived and nothing decoded — is
spelled out in the report rather than left as arithmetic.

Also names the decoder in use (VideoToolbox, D3D11VA, software) and points
at /api/state for the camera's own settings, since a green picture may be
the phone's virtual green screen doing its job on a subject it can no
longer find, which no plugin-side counter can distinguish.

Verified: clean configure-and-build from scratch with -Wall -Wextra
-Werror on both C and C++ paths, Qt6 present so the frontend compiled.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PSuQicA9NrKWwpgzY6SvhA
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 8, 2026

Copy link
Copy Markdown

Deploying lenslink with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7ea42ea
Status: ✅  Deploy successful!
Preview URL: https://5b166880.lenslink.pages.dev
Branch Preview URL: https://claude-diagnostics-report.lenslink.pages.dev

View logs

A user reported the source going green and staying green — through an OBS
restart and a phone restart — and gave up on the plugin. That is the exact
signature of the virtual green screen working correctly on a subject it
cannot find: the phone paints everything that is not a person chroma
green, so a lost segmentation (subject out of frame, or a subject-distance
cutoff set too tight) makes the whole frame background. The setting lives
on the phone, which is why restarting either end changed nothing.

Nothing in OBS said so. The status line read "Connected: iPhone — ~60 ms"
while the picture was solid green, so the only available conclusion was
that the plugin was broken. It now appends "green screen on", and when the
keying filter is missing — deleted by the user, which this code respects
forever — it says that instead: "green screen on, but nothing is keying it
out". Those are different problems and they now read differently.

The diagnostics report carries the same fact, and the troubleshooting page
gains the symptom, including that it costs the phone real work per frame,
which is a plausible half of the same reporter's "starts to lag".

No behaviour change: no filter is added, re-added or retuned. The plugin
only stops being silent about a setting that explains what the user is
looking at.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PSuQicA9NrKWwpgzY6SvhA
@MyNamesEMurray MyNamesEMurray changed the title Plugin: a one-button diagnostics report Plugin: diagnostics report, decode counters, and say when the green screen is on Sep 8, 2026
@MyNamesEMurray
MyNamesEMurray merged commit 1393bc7 into main Sep 8, 2026
8 checks passed
@MyNamesEMurray
MyNamesEMurray deleted the claude/diagnostics-report branch September 8, 2026 06:25
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.

2 participants