feat(l1): L1 workspace Phase 1 — role, seat enforcement, adhoc walker, audit #189

Merged
chihlasm merged 43 commits from feat/l1-workspace into main 2026-05-29 05:18:48 +00:00
3 changed files with 8 additions and 3 deletions
Showing only changes of commit aca1360164 - Show all commits

View File

@@ -42,7 +42,7 @@ export function L1WalkTreeVariant({ session, onSessionUpdate, onDone }: Props) {
const lastError = (err: unknown): string => {
if (typeof err === 'object' && err && 'response' in err) {
const detail = (err as any).response?.data?.detail
const detail = (err as { response?: { data?: { detail?: string } } }).response?.data?.detail
if (typeof detail === 'string') return detail
}
return 'Unexpected error'

View File

@@ -237,7 +237,12 @@ export function AccountSettingsPage() {
const invitesData = await accountsApi.getInvites()
setInvites(invitesData)
} catch (err) {
const resp = (err as any)?.response
const resp = (err as {
response?: {
status?: number
data?: { detail?: { code?: string; role?: string; current?: number; limit?: number } }
}
}).response
if (resp?.status === 402 && resp?.data?.detail?.code === 'seat_limit_exceeded') {
const d = resp.data.detail
const label = d.role === 'l1_tech' ? 'L1' : 'Engineer'

View File

@@ -48,7 +48,7 @@ export default function L1Dashboard() {
})
navigate(`/l1/walk/${response.session_id}`)
} catch (err) {
const detail = (err as any)?.response?.data?.detail
const detail = (err as { response?: { data?: { detail?: string } } }).response?.data?.detail
const msg =
typeof detail === 'string' ? detail : 'Failed to start walk. Try again.'
toast.error(msg)