feat: add base service layer and Guilds migration pilot - #285
Merged
Lakes41 merged 3 commits intoJul 27, 2026
Merged
Conversation
Contributor
|
This PR cannot be merged automatically because it has merge conflicts. Please update the branch with the latest base branch and resolve the conflicts. After the conflicts are resolved and checks pass, the automation can review it again. |
…yer-guilds-pilot # Conflicts: # src/features/guilds/useGuilds.ts # tests/hooks/useGuilds.test.ts
5 tasks
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.
Description
Introduces the base services layer for the mobile app's API/networking code
(centralized client, error normalization, retry with backoff, auth
interception) and migrates Guilds as the first feature to consume it, per
issue #218.
Linked Issue
Closes #218
Type of Change
Changes Made
src/services/api/): shared HTTPclient, normalized
ApiErrortype, retry-with-backoff for transientfailures, response parsing, and an auth interceptor (token injection,
refresh-on-401, session invalidation on repeated auth failure).
guildsService(src/services/guilds/guildsService.ts) as the firstfeature-level service, wrapping the existing
@guildpass/sdkclient withthe new error normalization/retry pattern.
useGuildsto consumeguildsServiceinstead of calling the SDKdirectly, preserving its public interface and the existing
GuildNotFoundErrorexport/behavior.session.adapter.ts/session.types.tsto support a real authcontract (token, refresh, invalidate, isAuthenticated) instead of a no-op
adapter.
queryClient.ts) to avoid duplicatingretries now handled by the service layer.
@guildpass/sdkentryresolution failure in
tests/api.test.ts) and refactor progress indocs/KNOWN_ISSUES.md.migrated in this PR — follow-up work, tracked as pending in
docs/KNOWN_ISSUES.md.Screenshots / Recordings
Not applicable — this PR is a backend/networking refactor with no UI changes.
Test Evidence
Checklist
pnpm typecheckpasses — not run in this environment, please verify in CIpnpm lintpasses — not run in this environment, please verify in CIpnpm test:runpasses — all tests green — ran via vitest directly (32/32 passing);pnpm test:runitself was not executed, please confirm in CIStyleSheet.createfor new UI without justification — N/A, no new UI.env.exampleupdated if new environment variables were added — N/A, no new env varsAdditional Notes
package-lock.jsonis intentionally not included in this PR, respecting therepository's existing decision (commit
eef5905) to keep lockfiles out ofversion control.
refresh failure, transient errors during retry not invalidating the
session) and the
GuildNotFoundErrordetection logic (covers both explicit404 status and legacy "not found" message matching).