Repository navigation
feat(config-ui): add a Teams page for org data management - #9205
Open
itaispiegel wants to merge 1 commit into
Open
itaispiegel wants to merge 1 commit into
itaispiegel wants to merge 1 commit into
Conversation
DevLake's team dashboards (DORA by Team, Engineering Throughput - Team View, Copilot by Team) join through `teams`, `team_users` and `user_accounts`, but config-ui offered no way to populate them: the org plugin's four CSV endpoints were reachable only by hand-crafting a multipart upload. On a fresh install those tables stay empty and every team dashboard renders blank. Adds a Teams page with three tabs backed by the existing org endpoints, so no backend change is required: - Teams: id, name, alias, sorting index, and parent team as a select of the other teams rather than a raw id. - Members: id, name, email, and team membership as a multi-select that serialises back to the `;`-delimited TeamIds cell. - Account Mapping: every collected tool account, with its identity columns read-only and a select to map it to a member. Rows cannot be added or removed here because accounts come from data collection. Each tab round-trips a whole CSV file, matching the endpoints' existing delete-all-then-save semantics; the page says so in an alert, since a save overwrites rows added elsewhere since the page loaded. Columns the UI does not edit (AvatarUrl, CreatedDate, Status) are preserved by keeping the server's header order and writing back untouched cells. The CSV helpers cover the subset of RFC 4180 that gocsv emits - quoted delimiters, doubled quotes, embedded newlines, CRLF - and are unit tested for round-trip stability. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
itaispiegel
force-pushed
the
feat/config-ui-team-management
branch
from
October 11, 2026 13:29
90ee85e to
56c0ed4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DevLake ships several team dashboards — DORA (by Team), Engineering Throughput and Cycle Time - Team View, GitHub Copilot Adoption by Team — and they all join through
teams,team_usersanduser_accounts. Until now config-ui had no way to populate those tables: theorgplugin's CSV endpoints were reachable only by hand-crafting a multipart upload withcurl. On a fresh install the tables stay empty and every team dashboard renders blank, which reads as if the dashboards were built on placeholder data.This adds a Teams page to config-ui, backed by the org plugin's existing endpoints. No backend change.
Three tabs:
;-delimitedTeamIdscell.Each tab round-trips a whole CSV file, matching the endpoints' existing delete-all-then-save semantics. The page states this in an alert, because a save overwrites rows added elsewhere since the page loaded. Columns the UI doesn't edit (
AvatarUrl,CreatedDate,Status) are preserved by keeping the server's header order and writing untouched cells back verbatim.The CSV helpers cover the subset of RFC 4180 that
gocsvemits — quoted delimiters, doubled quotes, embedded newlines, CRLF — and are unit tested for round-trip stability (7 tests).Does this close any open issues?
Closes #9206
Testing
yarn test— 50 tests across 7 files pass, including the newsrc/utils/csv.test.tsyarn tsc --noEmitandyarn buildcleandocker-compose-dev-mysql.yml): seeded teams and members, confirmed the page renders them, confirmed the parent-team and team-membership selects resolve ids to names, and confirmed the account mapping tab lists collected accounts.Notes for reviewers
GET /plugins/org/user_account_mapping.csv, which already returns every account with its currentUserId.Screenshots
🤖 Generated with Claude Code