Skip to content

add experimental file HttpApi read slice#22394

Draft
kitlangton wants to merge 9 commits intodevfrom
kit/file-httpapi-spike
Draft

add experimental file HttpApi read slice#22394
kitlangton wants to merge 9 commits intodevfrom
kit/file-httpapi-spike

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

Summary

  • move the shared file DTOs to Effect Schema with derived .zod compatibility for the existing Hono routes
  • add a parallel experimental file HttpApi slice for GET /file, GET /file/content, and GET /file/status
  • cover the new file list/content/status/docs flow with a server test

Verification

  • bun typecheck
  • bun run test test/server/file-httpapi.test.ts

Align the experimental question API schemas with the repo's Effect modeling style and keep the TUI answer rendering compatible with readonly arrays.
Decode pending question requests through the Schema.Class constructor path so the HttpApi list endpoint returns valid Question.Request instances while keeping QuestionID as a newtype.
Replace the ad hoc Object.assign wrapper with the shared schema helper so the Answer schema follows the same static attachment pattern as the rest of the codebase.
Capture the reusable pattern from the question HttpApi spike and turn the follow-up work into a checklist so the next route-group migrations can follow the same shape.
Move the shared file DTOs to Effect Schema, add a parallel experimental file HttpApi surface for list/content/status, and cover the new read-only slice with a server test.
Align the file HttpApi server test with the shared instance cleanup pattern used by the other experimental slices.
Base automatically changed from kit/question-httpapi-spike to dev April 14, 2026 19:43
Build the file HttpApi handlers with an effectful group callback so the file service is resolved once at layer construction time and the endpoint handlers close over the resulting methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant