Edit character route shows blank creation form instead of loading the character #31

Closed
opened 2026-08-23 05:42:03 +00:00 by nasandre · 0 comments
Owner

High

Routes `/characters/:id/edit` and detail page link to it, but `CharacterCreationPage` never reads the `:id` param.

  • `frontend/src/App.tsx`: `<Route path="characters/:id/edit" element={} />`
  • Links: `CharactersPage.tsx:231`, `CharacterDetailPage.tsx:98`
  • `CharacterCreationPage.tsx` has no `useParams`, no `fetchCharacter(id)`, no edit-mode state — it always renders an empty form.

Clicking Edit or Full Edit starts a brand-new character; saving creates a duplicate instead of updating.

Suggested fix

In CharacterCreationPage: read `useParams().id`, fetch the character, hydrate each step's state from it, and switch submit to `PUT /characters/:id`.

## High Routes \`/characters/:id/edit\` and detail page link to it, but \`CharacterCreationPage\` never reads the \`:id\` param. - \`frontend/src/App.tsx\`: \`<Route path=\"characters/:id/edit\" element={<CharacterCreationPage />} />\` - Links: \`CharactersPage.tsx:231\`, \`CharacterDetailPage.tsx:98\` - \`CharacterCreationPage.tsx\` has **no** \`useParams\`, no \`fetchCharacter(id)\`, no edit-mode state — it always renders an empty form. Clicking **Edit** or **Full Edit** starts a brand-new character; saving creates a duplicate instead of updating. ## Suggested fix In CharacterCreationPage: read \`useParams().id\`, fetch the character, hydrate each step's state from it, and switch submit to \`PUT /characters/:id\`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nasandre/wh40-rogue-trader#31
No description provided.