Role
Frontend lead for AI Services, frontend architecture, product workflow design, API contract collaboration
Case Study
Turning backend-heavy AI infrastructure capabilities into usable customer-facing and internal product workflows.
Summary
Role
Frontend lead for AI Services, frontend architecture, product workflow design, API contract collaboration
Scope
Model APIs, deployments, GPU resources, notebooks, storage, AI agents, analytics, billing, permissions, admin operations
Stack
React, TypeScript, REST APIs, dashboard UI, internal tooling
Focus
State modeling, API contracts, permissions, async workflows, operational usability
TL;DR
I helped turn EdgeCloud AI Services from separate infrastructure capabilities into a coherent product system for customers and internal operators.
Theta EdgeCloud exposed AI infrastructure workflows across model APIs, notebooks, GPU resources, storage, agents, usage, billing, permissions, and internal admin operations.
The frontend challenge was turning backend-heavy capabilities into safe customer workflows and reliable internal operator tools.
View public EdgeCloud site →The challenge was not just building screens. The product needed clear paths around configuration, validation, permissions, async provisioning states, usage visibility, billing context, and failure recovery.
The main risks showed up as:
I led most frontend implementation for EdgeCloud AI Services, covering customer-facing AI infrastructure flows and the internal admin dashboard used by support, QA, operations, and engineering.
My work often sat between product intent and platform constraints: deciding what should be visible to users, what needed backend confirmation, what belonged in reusable UI patterns, and where internal tooling needed different assumptions from customer-facing workflows.
Separate infrastructure capabilities became one product system through shared org/project context, permissions, async states, lifecycle patterns, and admin operations.
EdgeCloud scopes product data by organization and project. Requests, routes, persisted selection, and effective role all depend on that pair. Updating each value independently could briefly publish Org B / Project A1—an invalid context that React effects and API calls could act on, not just a visual flicker.
State invariant: whenever the UI renders tenant data, issues a tenant-scoped request, or makes a permission decision, the organization, project, route, and effective role must belong to the same validated tenant context.
A / A1
↓ organization updates
B / A1 ← invalid
↓ project updates
B / B1 Committed A / A1
↓ select Org B
Pending validate B / B1
↓ atomic publish
Committed B / B1 The previous context stays committed until projects, effective role, target project, and route can move together.
Load target projects and role independently, validate the project, then publish organization, project, and effective role atomically. Keep tenant route content closed until Redux context and routing represent the same completed transition.
Scope roles by organization, order same-organization role requests, and bind transition ownership to both request and session identity. Treat persisted IDs as restoration hints; ignore stale success and failure, and protect only caches where tests exposed stale cross-tenant data reuse—without a broad cache rewrite. Frontend role checks remain UX gates; backend authorization stays authoritative.
Tests assert that A/A1 → B/B1 never exposes B/A1, and that a late B response cannot replace a newer completed C transition. Coverage also includes stale role responses, invalid persisted context, session changes, route mismatches, and naturally project-less organizations.
GPU nodes are long-running asynchronous resources. A create or start request can succeed before the resource appears through the list API, while provisioning may continue for several minutes. Polling, navigation, and user mutations can all be active at the same time.
The central problem was not polling every few seconds. It was deciding which asynchronous result was still allowed to change the UI.
Readiness was inferred from raw backend fields. Missing status could stop polling too early, while failed or unknown observations could continue indefinitely.
A detail request could begin for one resource, outlive navigation, then commit old state or schedule another polling cycle.
A request could still belong to the current page while carrying a snapshot from before a stop or delete mutation.
GET A: Running
→ Stop succeeds
→ GET B: Stopped
→ old GET A resolves
→ UI returns to Running An immediate list miss after a successful create did not prove the write failed; list visibility and runtime readiness were separate events.
POST succeeds
→ immediate list GET misses
→ create outcome is still valid Backend response shape, resource lifecycle, capability readiness, and transport health are separate concerns. Explicit boundaries removed contradictory polling behavior; transport failure never becomes a lifecycle state, and unknown or degraded observations consume a bounded budget.
Each list or detail cycle captures an owner generation. Only the current generation may commit Redux responses, update local presentation, consume retry budgets, or schedule more work.
A request can still belong to the current page and be stale. Successful start, stop, delete, and rename operations advance a project-scoped mutation epoch, invalidating snapshots that began before the mutation. A response may commit only when its owner generation and captured mutation epoch are both current.
Query A begins
→ mutation succeeds
→ project epoch advances
→ Query A finishes
→ snapshot rejected The epoch stays in memory because it does not drive rendering. Its scope is project-level because a list response replaces the project snapshot.
POST success, list visibility, and runtime readiness are distinct. A successful response retains BaseID; reconciliation matches only that stable identity—never a display name, timestamp, newest row, or timing heuristic.
POST succeeds
→ invalidate pre-create snapshots
→ retain stable identity
→ owned list refresh
→ bounded reconciliation
→ exact resource becomes visible
→ normal lifecycle polling Visibility completes reconciliation even while the resource is pending or provisioning. The same owned polling loop handles both phases.
Cancellation saves resources. Ownership protects correctness. AbortController reduces obsolete work, but correctness does not depend on cancellation succeeding.
A rejected browser request does not prove the server made no change. If the POST reached the backend but its response was lost, an automatic retry could create a duplicate. The frontend invalidates pre-request snapshots, performs an observational refresh, attributes no row without a returned stable identity, does not automatically retry, and tells the user the outcome could not be confirmed.
An ambiguous write is different from a confirmed write failure. Exactly-once creation cannot be guaranteed by frontend code alone.
Deferred-promise and fake-timer tests reproduce concurrency failures without timing-sensitive integration behavior. The GPU-focused suite covers 100+ deterministic lifecycle cases, including:
The frontend can reject obsolete observations, but it cannot provide these guarantees on its own:
Stronger guarantees require backend contracts such as idempotency keys, operation IDs, or explicit read-after-write behavior.
Model complex flows around clear states such as draft, validating, provisioning, ready, failed, disabled, and permission-blocked instead of treating them as generic loading states.
Customer-facing pages need confidence and guardrails. Internal tools need fast lookup, safe defaults, status visibility, and recovery paths.
Work with backend engineers so analytics, billing, configuration, and admin views can share stable response shapes.
Turned AI Services into a more coherent self-serve product across model APIs, notebooks, GPU resources, storage, agents, and billing.
Built the internal admin dashboard from scratch and made common support, QA, ops, and engineering workflows self-serve.
Created reusable frontend patterns for permissions, async states, configuration forms, validation, and recovery paths.
Hardened GPU resource workflows around explicit lifecycle semantics, stale-response protection, mutation ordering, and bounded creation reconciliation.
Improved the boundary between customer-facing product areas and internal operations.
The core challenge was not rendering AI infrastructure data. It was making complex platform capabilities feel understandable, operable, and trustworthy.