Repository navigation
feat(agent): merge API keys and Local API into one API section - #1446
Merged
Merged
Conversation
Other applications reach Maple through the local endpoint with an account key: the backend's /v1 routes only accept Maple's encrypted transport. Keys and the listener are one feature, so Settings now has one API section with three cards: API credits, Local API and API keys. The keys pane told people to point any OpenAI-compatible client at the hosted URL. That was wrong: a real key gets 400 there and 200 through the listener. Remove the claim, and say so in the Local API doc. The Local API card stays on every plan. A key can belong to another account, and a listener left on after a downgrade must still be able to turn off. Creating a key scrolls its card into view. It can only be copied once, and below a taller page it would otherwise appear past the fold. Clean up the page: - Keys are rows in one card, with a quiet delete icon that becomes Cancel and Confirm delete, instead of a card and a Delete button each. - Local API state is a badge and one line beside the switch. Resume and Retry sit next to the switch instead of on a row of their own. - Save port appears only for a different valid port, and an invalid one is reported on its row as it is typed. Refresh status appears only to recover from a failed read or update. - Fold the setup notes and endpoint list into a short footnote, and count one active request correctly. - Every control on the page takes Tab, in page order, plus Enter and Space. widgets::card_stack holds the rows. activates is no longer feature-gated, since the keys card uses it in every desktop build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Settings has one API section instead of separate API keys and Local API entries, laid out as three cards: API credits, Local API, API keys.
The two belong together because the Local API is how other apps use these keys. The backend's
/v1routes only accept Maple's encrypted transport, so a key on its own can't reach them from an ordinary client.A wrong instruction is gone
The old keys pane said keys "work with any OpenAI-compatible client at
https://enclave…/v1". They don't. With the same real key against a Local stack:The page no longer says this, and
docs/local-api.mdnow explains why.Behavior to review
Section::ApiKeysis nowSection::ApiandSection::LocalApiis gone.Sectionisn't persisted. Editors (feat(agent): replace the ACP settings form with editor setup #1444) stays right after it.Cleanup
--that rendered as a dash in the old intro are gone.widgets::card_stackis the new shared piece.activatesloses its feature gate because the keys card needs it in every desktop build, andsection_title's doc comment is back onsection_title.Validation
Run on macOS after rebasing onto current master, without the workspace env sourced.
cargo fmt --check,just ci-lint,just ci-extra,just lane repocargo check --no-default-features --features desktop(no proxy)cargo test --workspace --no-fail-fastThe failure is
maple-agent-updater'sreads_native_release_tar_format_and_preserves_bundle_modes, a bsdtar issue on this host. This PR doesn't touch that crate. The pre-commit hook would stop on it, so the commit ran withMAPLE_HOOK_ONLY=repoafter running the Agent checks separately.Live, in the real debug app against a Local stack with a Pro fixture: one API sidebar entry, creating keys through the UI, the one-time reveal and scroll, turning the listener on, the status badge and port lock, the delete confirm step, quitting, and resuming On after relaunch.
Not exercised live:
Likely conflicts
The i18n work in #1372 and the draft "last used" column in #1140 both touch these strings and the key row, so whichever lands second will need a small rebase.
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.