Repository navigation
feat: add external API administrator UI - #809
Merged
dialmaster merged 94 commits intoNov 24, 2026
Merged
Conversation
bballdavis
force-pushed
the
feature/external-api-gui
branch
from
September 8, 2026 23:23
c5febdc to
2743176
Compare
bballdavis
force-pushed
the
feature/external-api-gui
branch
from
September 8, 2026 23:36
2743176 to
fb04fad
Compare
bballdavis
force-pushed
the
feature/external-api-gui
branch
from
September 9, 2026 12:50
fb04fad to
4961ba0
Compare
dialmaster
requested changes
Sep 13, 2026
bballdavis
force-pushed
the
feature/external-api-gui
branch
2 times, most recently
from
September 19, 2026 05:05
ffca52a to
dc54292
Compare
bballdavis
marked this pull request as ready for review
September 19, 2026 05:09
USAGE_GUIDE: restore the single-video note for bookmarklet keys, drop the legacy wording, and explain that the external keys section and the Requests page only appear with EXTERNAL_API_ENABLED=true, what the nav toggle does, and that the queue works without login when AUTH_ENABLED=false. CLAUDE.md: replace the thin ExternalRequests one-liner with what each file owns, add an ApiKeysSection entry, and drop the stray line that had landed above App.tsx in the frontend list.
Approving now only queues the work; the server's executor moves the request from approved to processing to a final status, and approving an approved or processing request again does nothing. - Only pending requests can be approved, so the "Retry approval" path and its locked grant checkbox are gone. - The queue refreshes itself every 5 seconds while any request on the page is approved or processing (not while the tab is hidden), without the loading spinner, and an open details dialog follows the refresh. - The details dialog says whether a request was approved automatically or by an administrator. - The approve dialog says the work runs in the background.
bballdavis
force-pushed
the
feature/external-api-gui
branch
from
October 22, 2026 13:37
768d826 to
446058c
Compare
Resolve API-key settings conflicts while preserving the reviewed UI and upstream runtime. Keep review actions visible on tablet layouts and update documentation for background execution.
dialmaster
requested changes
Nov 12, 2026
dialmaster
left a comment
Collaborator
There was a problem hiding this comment.
Looks like this is getting close.
I found some new things this round, noted inline. The main ones are:
/requestsredirects to Settings on a page reload- the dialog backdrop change affects every dialog in the app
- revoked bookmarklet keys show up in the list again
- "Select all" ignores the channel search
The branch also has a conflict with dev in .claude/rules/external-api.md.
The key editor only sees grants on enabled channels, and saving replaced the whole grant list. Editing a key while one of its channels was disabled removed that grant for good, even when only the rating changed. Replace only the grants on enabled, non-terminated channels. A grant on a disabled channel grants nothing while it stays that way and comes back when the channel is turned on again.
The channel list sorted by uploader alone, so channels with the same or an empty name could repeat or drop out between pages. The key editor pages through every channel, and a skipped channel could not be granted.
externalApiEnabled reads false until /getconfig answers, so reloading or bookmarking /requests sent you to Settings. The route now waits for the config to load before choosing.
After one background poll the reload stayed marked silent, so later filter and page changes showed no spinner or error and left the old rows under the new filter. A load is now silent only when it reloads the same query the poll started.
Closing on pointerdown changed every dialog in the app: a right-click or the start of a touch closed it, and the rest of the tap could land underneath. The Select isTrusted check already keeps a select trigger from dismissing its dialog, so go back to dev's click handler. Also drop the trusted-mousedown test. jsdom cannot make a trusted event, so it returned before its assertion and checked nothing.
Select all granted every channel in the library even when a search showed only a few, and clearing it dropped picks hidden by the search. It now adds or removes only the channels the search shows.
frontend.md asks new code to use the lib/icons aliases rather than lucide-react. Switch the new Requests and API key files over and add the Pencil and Radio icons they need.
Dev added read-only status keys while this branch split the settings into bookmarklet and external key lists, so status keys would have shown up as external keys. List them with the download keys, label each key's type, and offer the read-only option and the status summary address when creating one. Also address review gaps in the lists: - hide revoked keys from the bookmarklet list, as dev did, since GET /api/keys returns every key ever created; - keep active external keys listed while the External API is off, so they can still be revoked; they count toward the 20-key limit; - close the regenerate confirmation when regenerating fails, so the error behind it is visible. Update AUTHENTICATION.md, which still described the external API as a future feature, and note the grant and disabled-API behavior in EXTERNAL_API.md.
Approving or rejecting from the list's review column opened the details dialog once the decision saved. Go back to the list instead; a decision made from the details dialog still returns there with the new status.
jsdom only makes untrusted events, so the test took the same path as dev's Select and passed either way. The guard is for real taps, where the compatibility mousedown opened the menu under the finger before the click; explain that next to it.
Fold the created-key, create, revoke and regenerate dialog state into one value each, so the section is down to 9 useState calls and 300 lines, inside frontend.md's guide.
The section tests stub useApiKeys, so the hook's create, update, revoke and regenerate requests were untested. Add tests for those, for the privilege-increase check that guards saving, and for the external access editor's load, confirm, failure and retry paths. Move the hook test next to the hook.
If a granted channel was disabled between the eligibility check and the save, its kept grant collided with the new row and the save returned 500. Skip the duplicate, and say in EXTERNAL_API.md how a dormant grant is removed.
- Label the select-all box "Select all channels" until a search is typed, and say when a search matches no channels. - Don't show the zero-channels warning while the key's grants are still loading or failed to load. - Use the same eye icon for view-only access as the key cards do. - List the new external request types and rating policy files in the external-api rule paths so the rule loads for them.
dialmaster
approved these changes
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the administrator UI for the external API runtime merged in #810, on the persistence foundation merged in #750. This branch now includes upstream
devthroughdb872d39; both prerequisite PRs are merged.Compatibility and scope
Production backend code, migrations, package manifests, and dependency locks match current upstream
devexactly. The backend diff contains only two supporting test files. No schema changes, duplicate-channel consolidation, or new backend authorization behavior are introduced.The existing GUI review threads are resolved. This update merges upstream into the existing branch without rewriting its history and resolves the API-key settings and architecture-documentation conflicts.
Validation
Published head:
eeba599ae10080d6b38d6b607dc8ab6730d9922d.Local backend tests used a canonical temporary directory for an existing macOS symlink-path assertion. Documentation validation ran from an exported checkout without spaces because the existing generator does not decode spaces in its source path. Browser previews use synthetic Storybook fixtures; no live downloads, provisioning, deletion, deployment, or upstream merge occurred.
CI for this published head: all required checks passed, including the aggregate All Checks gate, both database engines, backend/frontend coverage, lint/types, Storybook, documentation, and security. The optional manual review job was skipped. The earlier changes-requested maintainer review still requires renewed approval; resolved inline threads do not replace that approval.
Screenshots
With
EXTERNAL_API_ENABLED=trueWith
EXTERNAL_API_ENABLED=false(the default for existing users)