chore(api): delete five unwired endpoints and guard against new ones - #90
Merged
Merged
Conversation
An APIClient function no screen calls reads as coverage in an endpoint diff while being a missing feature — how "shared with me", mute, add-org-member and trash-a-DM stayed invisible. Re-ran the sweep now that #47, #50 and #52 have landed; those three are wired, and what remained was genuinely vestigial. Deleted, with their tests: - `organizations()` — superseded by `userOrganizations()` and `publicOrganizations()`, both wired by #52 - `githubIssues(repo:state:)` — GitHub rows come through the /api/lists/:id/data proxy, which is the correct path - `updateListSchema(listId:schemaDSL:)` — the DSL variant, superseded by `updateListSchemaStructured` - `directMessage(id:)` — nothing addresses a DM by id; the UI opens threads by username - `markDMRead(id:)` — opening a thread marks it read server-side Kept, now with a comment saying why rather than sitting there unexplained: - `refreshMessageMetadata` — wiring it adds a request to the publish path, so it is tracked separately rather than slipped into a hygiene sweep - `verifyIdentity` — the only route reporting real token health; the /status routes report provider configuration, not whether this account's token works Added the sweep and a payload-key check to /ios-review so the next one is caught at review time. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017bss5MgZa7Jvj2m9zdaUd1
This was referenced Sep 15, 2026
Conflict confined to project.pbxproj; both sides were pure additions to the Sources build phases, so both were kept. Integrity verified: no undeclared Sources entry, no dangling fileRef, no duplicate object definitions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017bss5MgZa7Jvj2m9zdaUd1
Adron
added a commit
that referenced
this pull request
Sep 17, 2026
One conflict, in APIClient.swift: this branch adds the `queryValueAllowed` character set used by `unlinkIdentity`, and #90 (the dead-endpoint sweep, now on main) added a doc comment above `verifyIdentity` at the same point. Both kept, in that order, so the doc comment stays attached to the function it documents — verified after resolving. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017bss5MgZa7Jvj2m9zdaUd1
Adron
added a commit
that referenced
this pull request
Sep 17, 2026
One conflict, in APIClient.swift, resolved by taking this branch's version rather than keeping both: #90 (now on main) added a doc comment to the old two-argument `verifyIdentity(provider:providerId:)`, and this branch replaces that function outright with `verifyIdentity(provider:)` returning an `IdentityVerification` outcome. Main's copy is the version this supersedes, so keeping both would have left a stale duplicate and a signature that no longer compiles against the call site. Verified after resolving: only the single-argument form remains, and no `providerId` parameter survives anywhere in the file. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017bss5MgZa7Jvj2m9zdaUd1
Adron
added a commit
that referenced
this pull request
Sep 17, 2026
One conflict, in APIClient.swift, resolved by taking this branch's version. Main carries the "No caller yet, deliberately" note #90 added to refreshMessageMetadata; that became stale the moment #94 wired the call from ComposeView, and this branch replaces it with a comment describing the route's actual response shape. Keeping both would have restated a claim the code now contradicts. Verified after resolving: the stale note is gone, the decode reads top-level `links` as required, and MessageLinkPreview has no remaining references. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017bss5MgZa7Jvj2m9zdaUd1
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
Closes #64. Re-ran the zero-call-site sweep now that #47, #50 and #52 have landed. Those three did
wire their endpoints (
muteUser,trashDM/restoreDM,addOrganizationMember/joinOrganizationall have view call sites). What remained was genuinely vestigial.
Sweep result
Transport helpers (
get,post*,put*,patch*,delete*,checkResponse,postMultipartRawData,pathSegment,serverErrorMessage) are called viaSelf.inside the clientand were excluded, as the issue specifies.
organizations(limit:offset:)userOrganizations()andpublicOrganizations(limit:offset:), both wired by #52.githubIssues(repo:state:)/api/lists/:id/dataproxy, which is the correct path. Vestigial, as the issue suspected.updateListSchema(listId:schemaDSL:)ListSchemaEditorViewsaves viaupdateListSchemaStructured.directMessage(id:)markDMRead(id:)app/api/dm/thread/[username]/route.ts:31), so a per-message mark-read is redundant.refreshMessageMetadata(messageId:)MessageInput.tsx:511). That is a behaviour change to the most important path in the app, so it is tracked separately rather than slipped into a hygiene sweep.verifyIdentity(provider:providerId:)/statusroutes report whether a provider is configured server-side, not whether this account's token still works — which is whyLinkedIdentitiesViewcannot show a "reconnect needed" state. Deleting it would throw away the primitive that closes that gap.Both survivors now carry a comment saying why they are kept, satisfying the acceptance criterion
that no zero-call-site function is left unexplained.
Guarding against the next one
Added to
/ios-review:APIClientfunction needs a call site outsideServices/APIClient*, and request-body keys must match what the route destructures (thedefaultVisibilityclass of bug, Bug: "Default to public" never persists — iOS sends defaultVisibility, the API reads defaultPubliclyVisible #46).output is actionable rather than noisy.
Testing
xcodebuild … -parallel-testing-enabled NO -skip-testing:InterlinedListTests/E2EReadOnlyTests test— 1132 tests, 0 failures. Down 15 from main: the 11-test
APIClientUpdateListSchemaTestsfile(deleted and deregistered from
project.pbxproj) plus 4 individual tests for the other removals.Note for reviewers
This PR is cut from
main, so it does not know about the endpoints added in the in-flight PRs(#83
seedDefaultDocumentTemplates, #84crossPostReplyCounts, #86dmConversations,#88
documentPresence, #89 the app-settings routes). All of those are wired to a screen — I checkedas each was written — but the sweep is worth re-running once they merge.
🤖 Generated with Claude Code