Skip to content

Add a JSON API integration with a value widget - #55

Merged
cerebrate merged 3 commits into
masterfrom
feature/phase5e-json-api
Oct 18, 2026
Merged

cerebrate merged 3 commits into
masterfrom
feature/phase5e-json-api

Conversation

@cerebrate

Copy link
Copy Markdown
Member

Phase 5e. Any service that answers JSON can now feed a status pill on a link's tile or a status bar.

  • New json-api integration (one connection): base URL (path prefix allowed), authentication (none, basic, bearer, custom header) and an optional encrypted credential.
  • New json-api/value widget: requests a path under the base URL and shows one value picked by a small path syntax (slideshow.slides[1].title, ["odd key"], $), with an optional name, unit and expected value. The pill shows the value with its unit (2 slides, 42 ms, 93%); arrays show their item count.
  • JsonApiClient: 10 s timeout, 256 KB limit, 15 s cache of successful answers, certificates always validated, redirects not followed so credentials only go to the connection's host. Paths that are absolute or climb out of the base are refused before any request.
  • No migration or backup version bump; connections and widgets already round-trip generically (covered by a new backup test).
  • Docs: CLAUDE.md, README.md and docs/widgets.md.

Tests: 743 passing; Release build with ContinuousIntegrationBuild=true has no warnings; one ReSharper cleanup pass applied to the changed files.

🤖 Generated with Claude Code

cerebrate and others added 3 commits October 17, 2026 21:54
Any service that answers JSON can feed a status pill on a link's tile or a
status bar. The integration has one connection (base URL, authentication of
none, basic, bearer or custom header, and an optional encrypted credential);
its Value widget requests a path under the base and shows one value picked by a
small path syntax (JsonValuePath), with an optional unit and expected value.

JsonApiClient reads at most 256 KB, caches successful answers for 15 seconds,
validates certificates and never follows redirects, so credentials only go to
the connection's host; widget paths that are absolute or climb out of the base
are refused before any request.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A space in a widget's path, as in a query typed by hand, was refused with a
message saying the path wasn't relative; it's now encoded as %20, and the
containment checks still run on the result. The Value field is labelled
Value path, which says what it takes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cerebrate
cerebrate merged commit f5b7e22 into master Oct 18, 2026
3 checks passed
@cerebrate
cerebrate deleted the feature/phase5e-json-api branch October 18, 2026 05:13
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.

1 participant