Skip to content

feat: Add configure remodels form#5592

Merged
steverydz merged 1 commit intomainfrom
WD-30821-build-configure-remodel-panel
Mar 9, 2026
Merged

feat: Add configure remodels form#5592
steverydz merged 1 commit intomainfrom
WD-30821-build-configure-remodel-panel

Conversation

@steverydz
Copy link
Copy Markdown
Contributor

@steverydz steverydz commented Feb 18, 2026

Done

Adds a form for users to configure a remodel

How to QA

Testing

  • This PR has tests
  • No testing required (explain why):

Security

  • Security considerations for review (list them):
    • Examples:
    • Access control: users can only access their own data
    • Input: user input is validated and sanitised
    • Sensitive data: secret or private data is not exposed in any way
    • ...
  • This PR has no security considerations (explain why):

Issue / Card

Fixes https://warthogs.atlassian.net/browse/WD-30821

Screenshots

n/a

UX Approval

  • This PR does not require UX approval
  • This PR does require UX approval (add context):

@webteam-app
Copy link
Copy Markdown

@steverydz steverydz force-pushed the WD-30821-build-configure-remodel-panel branch 7 times, most recently from 60e777c to d29843b Compare February 24, 2026 15:20
@steverydz steverydz force-pushed the WD-30821-build-configure-remodel-panel branch 2 times, most recently from 6f3f8fa to 1c1d445 Compare March 2, 2026 14:12
@steverydz steverydz marked this pull request as ready for review March 2, 2026 14:23
Copilot AI review requested due to automatic review settings March 2, 2026 14:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a “Configure remodels” side-panel form to the publisher model remodels page, and updates the remodels table/data fetching to support serial-based remodel allowlist entries for a specific model.

Changes:

  • Introduces ConfigureRemodelForm and routes /remodel/configure to open it in an aside panel with success/error notifications.
  • Updates remodel list fetching (useRemodels) to filter remodels to the current model and sort by created date.
  • Updates remodel table to display serial information and adds pagination/sorting wiring plus tests.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
static/js/publisher/state/remodelsState.ts Simplifies remodel list state by removing policy-derived “serials” augmentation.
static/js/publisher/pages/Remodel/RemodelTable.tsx Updates columns (Serial) and adds pagination/sorting hook usage.
static/js/publisher/pages/Remodel/Remodel.tsx Adds “Configure remodels” entry point, aside panel rendering, and notifications.
static/js/publisher/pages/Remodel/ConfigureRemodelForm.tsx New form for configuring remodel allowlist entries (target model + serial/all-serials + note) with mutation handling.
static/js/publisher/layouts/ModelDetailsPageLayout/ModelPageLayout.tsx Ensures remodel nav state remains active on /remodel/configure.
static/js/publisher/index.tsx Adds route for remodel/configure.
static/js/publisher/hooks/useRemodels.ts Adds model-scoped filtering and sorts returned remodels.
static/js/publisher/hooks/tests/useRemodels.test.tsx Updates hook tests for new signature.
static/js/publisher/pages/Remodel/tests/RemodelTable.test.tsx Updates expected header label to “Serial”.
static/js/publisher/pages/Remodel/tests/ConfigureRemodelForm.test.tsx Adds tests for basic form enable/disable and serial mode toggle behavior.

Comment thread static/js/publisher/pages/Remodel/ConfigureRemodelForm.tsx
Comment thread static/js/publisher/hooks/useRemodels.ts Outdated
Comment thread static/js/publisher/pages/Remodel/Remodel.tsx Outdated
Comment thread static/js/publisher/pages/Remodel/Remodel.tsx Outdated
Comment thread static/js/publisher/pages/Remodel/ConfigureRemodelForm.tsx Outdated
Comment thread static/js/publisher/pages/Remodel/Remodel.tsx Outdated
Comment thread static/js/publisher/pages/Remodel/RemodelTable.tsx Outdated
Comment thread static/js/publisher/pages/Remodel/ConfigureRemodelForm.tsx Outdated
Comment thread static/js/publisher/pages/Remodel/ConfigureRemodelForm.tsx
@steverydz steverydz force-pushed the WD-30821-build-configure-remodel-panel branch 4 times, most recently from d45a6ad to 07bfe20 Compare March 6, 2026 17:26
@leiaru-c
Copy link
Copy Markdown

leiaru-c commented Mar 9, 2026

Reviewed and it looks good to me!

Copy link
Copy Markdown
Contributor

@edisile edisile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, I only have a very small nitpick

): UseQueryResult<RemodelType[], Error> => {
return useQuery<RemodelType[], Error>({
queryKey: ["remodels", brandId],
model_id: string | undefined,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nitpick, but model_id should be renamed to modelId to follow the style convention


function Remodel(): React.JSX.Element {
const { id } = useParams();
const { id, model_id } = useParams();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

setShowErrorNotification,
setErrorMessage,
}: Props): React.JSX.Element {
const { id, model_id } = useParams();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since model_id comes from useParams I assume that the route definition should also be changed to modelId

@steverydz steverydz force-pushed the WD-30821-build-configure-remodel-panel branch from 07bfe20 to efb04b4 Compare March 9, 2026 11:58
@steverydz steverydz merged commit 50a550c into main Mar 9, 2026
14 checks passed
@steverydz steverydz deleted the WD-30821-build-configure-remodel-panel branch March 9, 2026 12:03
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.

5 participants