Repository navigation
Add edit page for external (parent) projects, and a few of other stuff - #1221
Conversation
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>
cb1b5e2 to
2c45b97
Compare
Fewer columns remain Dates now mark start and end Table stands taller Haiku by Claude Sonnet 5.5
2c45b97 to
9dbe67d
Compare
| [projectIDs, fetchedProjects], | ||
| ) | ||
|
|
||
| // Charge les projets internes correspondant aux IDs associés au projet parent. |
There was a problem hiding this comment.
Bilingual comments nice ;)
| if (!cancelled) setError("Unable to fetch the external project") | ||
| }) | ||
| .finally(() => { | ||
| if (!cancelled) setIsLoading(false) |
There was a problem hiding this comment.
isn't this at risk to let the page in a state of permanent loading ?
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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
setStateorform.setFieldsValueon a component that is gone. - Out-of-order responses: if
parentProjectIdchanges 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.
Add edit page for external (parent) projects, and a few of other stuff