refactor: split the HTTP client into slice modules with a reexport facade - #33
Merged
Conversation
…cade Paso 4.client. Implementations move to ui/src/api/<slice>.ts. client.ts keeps the public import path and reexports every slice. Signatures, paths and payloads are unchanged. ui/README.md still contains src/api/client.ts.
PR Review — Loreframe StudioRisk: high Automated review from Findings
Changed files
CONTRIBUTING checklist
Posted by the repo PR review workflow. Re-runs on each push to the PR. |
Owner
Author
|
cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit c137696. Configure here.
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.
Alcance
Paso 4.client del plan canónico.
ui/src/api/client.tsqueda como fachada pública (export *de cada slice).ui/src/api/<slice>.ts(generation, stories, director, series, comics, llm, etc.).ui/README.mdconserva el literalsrc/api/client.ts.client.tsahora leen la superficieui/src/api/*.ts.No mezcla stores, Story JSX, Wizard ni features. No toca
_launch_runtime.pynidirector_pipeline.py.Tests locales
npm run check(test, lint max-warnings=0, tsc+build, budget) → PASSnpm run test:e2e→ 2 passedscripts/check_documentation_links.py→ PASSIndependencia
Ningún PR abierto tocaba
client.ts. Este PR no comparte hotspot con el muro WanGP ni con el gate 6.a. No mezclar.Note
Low Risk
Refactor-only HTTP client organization with contract tests updated; no backend or runtime API contract changes described in the diff.
Overview
Splits the typed HTTP boundary from a single
client.tsinto domain slice modules underui/src/api/(generation, stories, director, characters, etc.), withclient.tskept as the public facade viaexport *re-exports so callers still import from one entry.Adds
tests/api_client_source.py, which concatenates sortedui/src/api/*.tssources. Python source-contract tests that previously read onlyclient.tsnow use this helper so assertions still cover the full client surface after the split.Documents the layout in
ui/README.md: slice modules sit besideclient.tsand are re-exported from it. HTTP paths, payloads, and function names are intended to stay unchanged—this is structural refactor plus test harness alignment, not an API behavior change.Reviewed by Cursor Bugbot for commit c137696. Configure here.