Skip to content

OBJ-91 — Document editor with all v1 controls - #42

Merged
objectgyan merged 1 commit into
mainfrom
objectgyan/obj-91-m82-document-editor-with-all-v1-controls
May 17, 2026
Merged

objectgyan merged 1 commit into
mainfrom
objectgyan/obj-91-m82-document-editor-with-all-v1-controls

Conversation

@objectgyan

Copy link
Copy Markdown
Owner

Summary

  • Implements the full document editor page at /doc/:id with section/field CRUD, useReducer-based form state, ETag-aware PUT save, and inline API validation error display
  • Adds one React component per v1 control type: Textbox, Number, Date, Dropdown, Checkbox, Table (static), Table (dynamic)
  • Adds Playwright tests (3/3 pass): create+save+reload all controls, inline error for too-long value, section add/remove

Test plan

  • pnpm lint — exit 0
  • pnpm typecheck — exit 0
  • pnpm build — exit 0
  • Playwright: renders editor, edits all v1 controls, saves via PUT, reload shows same state
  • Playwright: validation failure shows inline error-banner, document NOT modified
  • Playwright: add/remove sections saves correctly
  • DB: SELECT fields body confirms all 6 control types persisted with correct values
  • API: PUT with too-long textbox (maxLength=5) returns 400 code=too_long
  • scripts/validate-obj-91.ps1 exits 0

@objectgyan
objectgyan merged commit 50d1063 into main May 17, 2026
@linear-code

linear-code Bot commented May 17, 2026 •

Copy link
Copy Markdown
OBJ-91 M8.2 — Document editor with all v1 controls

Milestone: M8 · Wave: 3

Summary

Build the editor screen: add/remove sections, add fields of each v1 control type (Textbox, Number, Date, Dropdown, Checkbox, Table). Save persists via the API.

Acceptance

  • All v1 controls renderable + editable in the UI
  • Save round-trip works
  • Validation errors from API surface inline

Validation

  • DB check: after a save from the UI, the document body in SELECT body FROM documents WHERE id=… matches the UI state
  • Live API check: Playwright UI test creates a doc with all controls, saves, reopens, fields persist
  • Script: scripts/validate-obj-NNN.ps1

Branch / PR

Branch from main; target main. No trailers/footer.

Review in Linear

objectgyan added a commit that referenced this pull request May 17, 2026
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