Skip to content

Add a service provider over the entities slice - #166

Merged
sgomez merged 2 commits into
frontend-rebuildfrom
agent/frontend/143
Nov 25, 2026
Merged

sgomez merged 2 commits into
frontend-rebuildfrom
agent/frontend/143

Conversation

@sgomez

@sgomez sgomez commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Closes #143. Part of #135.

Summary

 pages/
+├── AddServiceProviderPage.tsx        # composition over the entities slice
 domain/entities/
+├── add/AddEntity.tsx                 # paste area or starter editor, by capability
+├── add/PasteArea.tsx                 # Paste / Upload / Start empty, Detected, Review
+├── add/detect.ts                     # format detection, entity count
 ├── port.ts                           # + readPasted? (POST api/entities/{set}/read, not served)
 design-system/
 ├── TextArea.tsx                      # + code: mono, wrap off, no spell check
 screens/edit/
-└── AddServiceProvider.tsx
AddEntity
  port.readPasted absent (HTTP adapter, production)  -> starter editor (draft 07), as today
  port.readPasted present (memory adapter, Storybook) -> PasteArea
    ?source=upload -> Choose file (FileButton), read in the browser into the paste area
    ?source=empty  -> starter editor
    Review       -> readPasted(text, format) -> editor filled, unsaved
  • Source segments are links (?source=), as on Add authsource (Overview, entity sets, External entities and Authsources in Storybook #164).
  • Title "Add service provider" (paste area and editor), crumb "Add".
  • The entity ID error on the $metadata['…'] line with "Open " and the new object's save bar ("Unsaved", Cancel, Save) are unchanged.
  • No API change: POST api/entities/{set}/read stays unserved, so production shows only Start empty.

Evidence

  • Stories in Pages/Add service provider: the AddEntity board, plus Drafts: Nothing pasted, PHP array detected, Upload, Reviewed, Not read (server error), Start empty (draft 07), As the API serves it today, Entity ID already exists. Each one has screenshots (light/dark, 1440/400).
  • jsdom: the add tests moved from screens/edit/ to pages/AddServiceProvider{Open,Save,History}.test.tsx (wording now Add), plus AddServiceProviderPaste.test.tsx and add/detect.test.ts.
  • composer test, composer static, npm run lint, npm run typecheck, npm test (lines 98.9 %), composer build with no diff, and npm run test:visual three runs with zero diffs.

Board differences

AddEntity board compared with the AddEntity story (computed styles and screenshots, light and dark, 1440 and 400). Width 920, gap 16, the textarea, Detected select, Review and link all match in position and size. What still differs:

  • No URL segment. SPEC 1.5 / 9.6 make URL fetch a non-goal.
  • Text area label and placeholder: "Metadata XML or PHP array", not "…or Console export". SPEC 9.6 has no export format. The Detected select has no "Console export" option either.
  • Narrow header: count-only Review button, as on every page (Console UI as a single-page application #98 ruling, P11). The board shows the full "Review 7 changes".
  • Start empty opens the starter PHP editor (approved draft 07), not the Settings form the board links to (FormServiceProvider is out of scope in Rebuild the Console front end in layers on React Aria, with Storybook and page screenshots #135).
  • Review opens the editor filled and unsaved, without the report panel of SPEC 9.6 or the AddReview board. That board is not part of this issue. Several entities (AddSeveral), wrong kind (AddWrongKind), unreadable input (AddUnreadable), the Examples card of AddEmpty and the 1 MiB cap are not built either. They need the read API and boards outside Add a service provider over the entities slice #143.
  • Upload has no board. It shows a "Choose file" button in place of the text area and returns to Paste with the file's text (Draft story).

Merge Danger

Door: two-way

Blast Radius: add screen

Production renders the same starter editor as before. Only the title ("New service provider" becomes "Add service provider") and the crumb ("New" becomes "Add") change there. New reference screenshots wait for the maintainer's visual-change label.

@sgomez
sgomez force-pushed the agent/frontend/143 branch from 89a0b67 to 7add397 Compare November 25, 2026 21:21
@sgomez
sgomez merged commit 86172a0 into frontend-rebuild Nov 25, 2026
16 checks passed
@sgomez
sgomez deleted the agent/frontend/143 branch November 25, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant