itaispiegel opened a new pull request, #9205:
URL: https://github.com/apache/devlake/pull/9205

   ### 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_users` and `user_accounts`. Until now 
config-ui had no way to populate those tables: the `org` plugin's CSV endpoints 
were reachable only by hand-crafting a multipart upload with `curl`. 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:
   
   - **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 can't be added or 
removed here, since accounts come from data collection.
   
   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 `gocsv` emits — quoted 
delimiters, doubled quotes, embedded newlines, CRLF — and are unit tested for 
round-trip stability (7 tests).
   
   ### Does this close any open issues?
   
   No open issue; happy to file one if the project prefers that order.
   
   ### Testing
   
   - `yarn test` — 50 tests across 7 files pass, including the new 
`src/utils/csv.test.ts`
   - `yarn tsc --noEmit` and `yarn build` clean
   - Driven manually against a local DevLake (`docker-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
   
   - There's no endpoint that lists accounts independently of the mapping file, 
so the Account Mapping tab reuses `GET /plugins/org/user_account_mapping.csv`, 
which already returns every account with its current `UserId`.
   - Full-file replace is inherited from the endpoints. Per-row CRUD on the org 
plugin would be a better end state; that felt like a separate, backend-side PR.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to