Skip to content

Split oversized frontend components #16

@gauthierpiarrette

Description

@gauthierpiarrette

Problem
Three components exceed the 150-line guideline from the project coding standards:

  • FormField.svelte — 316 lines
  • ToolDetail.svelte — 352 lines
  • ResultView.svelte — 325 lines

Large components are harder to review, test, and maintain.

Proposed solution

  • ToolDetail → extract ToolHeader.svelte (name, badges, description, warnings) and InputModeSelector.svelte (form/json/schema tabs)
  • FormField → extract ArrayField.svelte and UnionField.svelte (oneOf/anyOf handling)
  • ResultView → extract TextResultBlock.svelte, ImageResultBlock.svelte, JsonResultBlock.svelte

Alternatives considered
Leaving as-is since they work. But smaller components are easier to unit test with Vitest and follow the project's own standards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrefactorCode refactoring with no behavior change

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions