Skip to content

[Frontend] Service edit page - #60

Open
pallasathena92 wants to merge 3 commits into
yifeliu/service-detail-pagefrom
yifeliu/service-edit
Open

pallasathena92 wants to merge 3 commits into
yifeliu/service-detail-pagefrom
yifeliu/service-edit

Conversation

@pallasathena92

Copy link
Copy Markdown
Contributor

What this PR does

Plan Phase 2, last frontend item: app/(dashboard)/services/[name]/edit/page.tsx, the page the detail page's Edit button and the list's edit action link to. It loads the service by name and ?namespace=, and renders the ServiceForm from #58 in edit mode with the YAML tab open first, since the form owns only the common fields and the YAML shows the whole stored object. Saving goes through the form's pipeline (schema check, API server dry run, real update keeping resourceVersion) and returns to the detail page. A missing service shows the error with a way back.

ServiceForm gains a defaultTab prop for this.

Based on #59 with #58 merged in (it needs both the detail page and the form), so the diff shows #58's commits until that merges; the new work is the last commit.

Why we need it

Editing a service meant kubectl edit; the console linked to an edit page that did not exist.

How to test

  • cd frontend && npm run typecheck && npm run lint && npm run format:check && npm run gen:types:check && npm test pass (140 tests; new: the page loads by name and namespace, opens on the YAML tab, returns to the detail page after saving, and shows the not-found error with a back link).
  • Against a cluster: open a service, click Edit, change spec.engine.minReplicas in the YAML, save, and see the detail page refresh with the new value.

Checklist

  • Tests added/updated (if applicable)
  • Docs updated (if applicable) — N/A
  • make test passes locally — frontend; backend untouched

@coderabbitai

coderabbitai Bot commented Oct 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 01c19b47-9444-4cc5-8f5f-025b2e18642b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added frontend Frontend/UI changes tests Test changes labels Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Frontend/UI changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant