Skip to content

Add edit page for external (parent) projects, and a few of other stuff - #1221

Merged
nafiz1001 merged 5 commits into
masterfrom
project-project-edit
Oct 16, 2026
Merged

nafiz1001 merged 5 commits into
masterfrom
project-project-edit

Conversation

@nafiz1001

@nafiz1001 nafiz1001 commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Add edit page for external (parent) projects, and a few of other stuff

nafiz1001 and others added 3 commits October 14, 2026 16:46
Add an Edit button on the external project details page that opens a
separate page to update the parent project fields.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Drive the form items from a FormItemProps config array, use Input's
built-in character count instead of a max-length rule, replace Space
with Flex, and make the label/wrapper columns responsive and wider.
Add scrollToFirstError.

Fields line up in rows,
labels breathe beside the inputs,
the form stands up straight.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The internal projects list, its loading flag and its fetch only serve the
Projects tab. The details page now fetches only the parent project and
shows the project count as plain text in the tab label.

Remove the unused ExternalIDProjectDashboard component. Make the external
ID link on the external projects list open the overview tab.

Tab loads its own data,
page keeps only the parent now,
counts sit in brackets.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@nafiz1001
nafiz1001 requested a review from UlysseFG October 15, 2026 16:05
@nafiz1001
nafiz1001 marked this pull request as ready for review October 15, 2026 16:05
@nafiz1001 nafiz1001 changed the title Add edit page for external (parent) projects Add edit page for external (parent) projects, and bunch of other stuff Oct 15, 2026
@nafiz1001 nafiz1001 changed the title Add edit page for external (parent) projects, and bunch of other stuff Add edit page for external (parent) projects, and a few of other stuff Oct 15, 2026
@nafiz1001
nafiz1001 force-pushed the project-project-edit branch from cb1b5e2 to 2c45b97 Compare October 15, 2026 17:18
Fewer columns remain
Dates now mark start and end
Table stands taller

Haiku by Claude Sonnet 5.5
@nafiz1001
nafiz1001 force-pushed the project-project-edit branch from 2c45b97 to 9dbe67d Compare October 15, 2026 17:25
[projectIDs, fetchedProjects],
)

// Charge les projets internes correspondant aux IDs associés au projet parent.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Bilingual comments nice ;)

if (!cancelled) setError("Unable to fetch the external project")
})
.finally(() => {
if (!cancelled) setIsLoading(false)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

isn't this at risk to let the page in a state of permanent loading ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'll ask Claude... But my theory is that the state becomes stale when it's cancelled (which is only the case when the component is unmounted).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's a stale-response guard in the fetch effect ([ExternalProjectEditPage.tsx:73](frontend/src/components/projectOverview/ExternalProjectEditPage.tsx:73)).

The cleanup function at line 87 sets cancelled = true when the effect re-runs or the component unmounts. The .then, .catch and .finally handlers check the flag before touching state. This prevents two problems:

  • Unmounted component: if the user leaves the page before the request returns, the handlers don't call setState or form.setFieldsValue on a component that is gone.
  • Out-of-order responses: if parentProjectId changes while a request is in flight, the older response can't overwrite the state for the newer project.

The API call itself isn't aborted. The result is only ignored. An AbortController would be the alternative, but it only helps if api.parentProjects.get accepts a signal. If the repo uses the flag pattern elsewhere, it's consistent. If you'd rather drop it, the effect still works, but you'd risk the stale updates above.

@nafiz1001
nafiz1001 merged commit 1f28d1f into master Oct 16, 2026
1 check passed
@nafiz1001
nafiz1001 deleted the project-project-edit branch October 16, 2026 14:13
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.

2 participants