Skip to content

feat(ui): External Data, Users & permissions, create table#3

Merged
hujincalrin41 merged 4 commits into
mainfrom
feature/ui-promotion
Jul 13, 2026
Merged

feat(ui): External Data, Users & permissions, create table#3
hujincalrin41 merged 4 commits into
mainfrom
feature/ui-promotion

Conversation

@hujincalrin41

Copy link
Copy Markdown
Contributor

Enhances the UC UI with three new areas plus create/manage flows.

What's new

  • External Data — External Locations & Credentials tabs (list + detail). Credential detail shows type (Aliyun STS / static AK-SK / AWS IAM), a masked access-key id (the secret is never returned by the API), the STS trust-policy hint, and "used by" locations. Create for both; a per-credential Validate probes real credential vending against a bound location.
  • Users — SCIM user list (search by name OR email) + detail drawer + Create User, and a per-user permissions view.
  • Permissions — grant / revoke on credentials, external locations, catalogs and the metastore, with %substring% user search.
  • Create table bound to a registered external location (inheriting that location's credential); the table detail sidebar shows the storage → external-location → credential chain.
  • Shared list UX: 20 / 50 / 100 page-size selector (default 20), full pagination (follows the API's next_page_token / SCIM startIndex so nothing is truncated at the server page cap), and error surfacing.

Tests

  • Unit + component tests (36) — the HTTP layer is fully mocked (no server, no cloud, no credentials).

Notes

  • The per-user permissions view filters assignments to the target principal client-side, since GET /permissions currently ignores the ?principal query filter; a server-side filter is a sensible follow-up.
  • Path params are percent-encoded and list queries are paginated to avoid truncation at the server page cap.

@fasdwcx fasdwcx left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

hujincalrin41 and others added 3 commits July 13, 2026 08:47
Adds three top-nav areas to the UC UI:
- External Data: two tabs (External Locations / Credentials) with list +
  detail pages. Credential detail shows type (Aliyun STS / Aliyun static
  AK/SK / AWS IAM), a masked access-key id (the secret is never returned by
  the API), the STS trust-policy hint, and "used by" locations. Location
  detail links back to its credential. Both support Create (secret entered
  via a password field; server enforces CREATE_STORAGE_CREDENTIAL /
  CREATE_EXTERNAL_LOCATION and its 403 is surfaced verbatim).
- A per-credential Validate action vends temporary PATH_READ credentials for
  a bound external location, probing the real vend path; the notification is
  scoped to the exact path probed.
- Users: SCIM user list (search by name OR email) with a detail drawer, Create
  User, and a per-user permissions view. A Grant/Revoke UI (securable- and
  user-scoped) rounds out permission management.

Shared infra used across these lists:
- ListLayout paginates client-side with a 20/50/100 page-size selector
  (default 20) and renders a failed load as an alert instead of an empty
  table; an optional searchText accessor lets Users search email too.
- List hooks follow pagination to the end (credentials/external-locations via
  next_page_token, SCIM users via startIndex) so nothing is silently
  truncated at the server's page cap.
- openapi route() percent-encodes path params (names with '/', '%', ...) via a
  function replacer, and the per-user permissions query filters assignments to
  the target principal client-side (the server ignores ?principal) and
  surfaces a total failure as an error rather than "no privileges".
- Queries no longer retry (a 401/403/404 is deterministic; retries only
  delayed the error state).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…hain

- Create Table from a schema page: pick a registered external location (which
  binds the table to that location's credential) plus an optional subpath, with
  a live storage-location preview and a dynamic column editor. Subpaths with
  '.'/'..' segments are rejected (they would escape the location the server
  authorizes by raw string prefix), and column names must be non-blank and
  unique. DECIMAL columns carry type_precision/type_scale so consumers that
  rebuild the schema don't derive an invalid decimal(0,0).
- Table detail sidebar gains a Storage section: storage_location -> the
  longest-prefix-matching external location -> its credential, all linked.
  While the locations list is loading/failed/permission-filtered it says so
  rather than falsely claiming the table is under no registered location.
- useCreateTable invalidates listTables using the request params (the response
  body's catalog/schema are optional) and drops cached getTable entries so a
  delete+recreate of the same name can't render the old table from cache; the
  create modal resets on open so a cancelled draft doesn't reappear.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- L1 unit tests: credential type/mask helpers, external-location longest-prefix
  matching + storage-path join, and Spark column-type mapping.
- L2 component tests: every create modal (payload contract per credential
  type, SCIM user body, external-location binding, create-table columns/
  storage_location), grant (changes add/remove shape + %xx% user filter), and
  the validate button (disabled without a bound location, PATH_READ payload,
  success/error notifications). The HTTP layer is fully mocked (jest.mock of
  the axios CLIENT) — no server, no cloud, no credentials.
- Jest infra: a providers renderer, a mock-client router asserting request
  payloads, antd interaction helpers, and setupTests polyfills (matchMedia,
  getComputedStyle guard, scrollbar-size + antd/es->lib mapping, axios ESM->CJS
  mapping) plus a notification teardown so a prior test's toast can't satisfy a
  later query. package.json/yarn.lock pinned so --frozen-lockfile passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hujincalrin41
hujincalrin41 force-pushed the feature/ui-promotion branch from e45c6a7 to 1e015b2 Compare July 13, 2026 08:47
Runs the UI jest suite and production build on PRs that touch ui/.
The existing lint-check.yml only runs prettier/eslint; this adds the
functional test + type-check gate (mirrors the GitLab ui-test job).
@hujincalrin41
hujincalrin41 merged commit 4a82818 into main Jul 13, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants