[US-1.2 / OBT-199] Edit a language's name and code in a dialog - #26
[US-1.2 / OBT-199] Edit a language's name and code in a dialog#26levigtri wants to merge 3 commits into
Conversation
Add an edit affordance (pencil on hover) to each language card that opens the shared dialog pre-filled with the language's name and code. Saving calls the new languagesAPI.update (PUT), refreshes the store, and surfaces duplicate-code (409) errors. Add the LanguageUpdate type and updated_at to LanguageResponse (US-1.1).
Show the language edit pencil only when the user is a platform admin. Direct edit is admin-only per the 2026-07 rule change; managers submit an edit request (change-requests feature) rather than editing directly.
b6cff54 to
6e69ffc
Compare
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Warning Review limit reached
Next review available in: 42 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: QUIET Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
Lets a language be edited from its card via a pre-filled dialog (name + 3-char ISO 639-3 code). Per the 2026-07 rule change, the direct edit affordance (pencil) is shown only to platform admins — a manager does not edit a language directly; a manager submits an edit request (scoped to languages linked to their own projects) for an admin to approve, delivered by the change-requests feature (separate US). A plain member has no console access at all.
Changes
src/components/pages/LanguagesPage.tsx: hover pencil opens the shared dialog pre-filled with the language's name/code; save callslanguagesAPI.update, invalidates the store, and re-fetches; duplicate code surfaces the 409 as a toast.isPlatformAdmin. (The manager request-edit affordance lives in the change-requests feature.)Type of Change
Testing
npm run typecheck— clean.npm run lint— 0 errors (only the pre-existingProjectsPage.tsxwarning).npm run build— succeeds.