[Refactor]: Split large frontend catalog pages into composable pieces
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- frontend
Direzione di ricerca
Read frontend/README.md and the eslint-plugin-boundaries config first to learn the layer rules. Start with the duplicated mergeRowFieldErrors in ExecutionDetailsView.tsx and CaseDetailsPage.tsx, then move the shared helpers into a utility module beside externalLinkEditing.ts. Done means each helper has one definition, the three files are much smaller, and make frontend-lint and make pre-commit-run pass with no behavior change.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem?
Three catalog components in frontend/src/features/catalog/ hold page layout, form state, validation mapping, URL state, and many small sub-components in one file:
| File | Lines | Mixed concerns |
|---|---|---|
components/ExecutionDetailsView.tsx |
~1,740 | Read-only field components, artifact and link editing (EditableResourceList), validation error mapping (mapSaveValidationErrors, toValidationPathLabel), form state and update payload building |
CaseDetailsPage.tsx |
~1,580 | Resource grouping and labels, form state and update payload building, save error handling (getUpdateError) |
CasesPage.tsx |
~1,240 | URL search-param parsing and serialization (parseCaseSearchState, serializeCaseSearchState), sorting and paging constants, table rendering |
Duplication:
mergeRowFieldErrorsis defined identically inExecutionDetailsView.tsxandCaseDetailsPage.tsx.- Both detail views define their own
toEditableFormState,normalizeEditableValue, andbuildUpdatePayloadwith the same shape. ExecutionDetailsView.tsxdefinesEditableResourceListinline, next to the existingcomponents/EditableExternalLinkList.tsx.
Related: #306 (backend counterpart).
Describe the solution you'd like
Extract pieces into features/catalog/ without changing behavior.
components/: move reusable sub-components out ofExecutionDetailsView.tsx(FieldRow,ReadonlyInput,ReadonlyText,UserDisplay,ExternalResource*,EditableResourceList).- Utility module (for example,
resourceEditing.ts, alongsideexternalLinkEditing.ts): shared row-error helpers (mergeRowFieldErrors,hasAnyRowErrors) and validation error mapping. hooks/: a hook forCasesPageURL search state (for example,useCaseSearchParams) that wraps the parse and serialize functions.- Keep page files focused on layout and data wiring.
Follow the existing layer rules in frontend/README.md and eslint-plugin-boundaries. Code stays inside features/catalog/ unless it is truly reusable across features, in which case it goes in components/shared/.
Acceptance criteria
mergeRowFieldErrorsand the other duplicated helpers have one definition each.- Each of the three files is substantially smaller and contains mainly page or view composition.
- No UI or behavior change: the catalog pages render and edit as before.
make frontend-lintandmake pre-commit-runpass.
Describe alternatives you've considered
- One generic detail-editing form shared by cases and executions. The fields and payloads differ enough that this would add abstraction too early. Share helpers first.
Additional context
Other large frontend files, possible follow-ups: features/diagnostics/ComparePage.tsx (~860 lines), features/diagnostics/components/RunEditor.tsx (~850), and features/upload/UploadPage.tsx (~750).
- Lingua principale
- Python
- Stelle
- 2
- Fork
- 2
- Merge medio
- 12h 49m
- PR unite (30g)
- 30
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di E3SM-Project/simboard
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
E3SM-Project/simboard#504 ·
I maintainer di solito rispondono entro 1 giorno
-
doc
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
E3SM-Project/simboard#356 ·
I maintainer di solito rispondono entro 1 giorno
-
devops
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
E3SM-Project/simboard#292 ·
I maintainer di solito rispondono entro 1 giorno
-
devops
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
E3SM-Project/simboard#170 ·
I maintainer di solito rispondono entro 1 giorno
-
refactor
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
E3SM-Project/simboard#509 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di E3SM-Project/simboard
Issue simili
-
backend: claude chore dependencies
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
briandconnelly/amicus#606 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
semantica-agi/semantica#2320 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
vllm-project/vllm-omni#11465 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
jxxghp/MoviePilot#7699 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
vllm-project/vllm-ascend#24010 ·
I maintainer di solito rispondono entro 1 giorno