test(canvas): add FilesTab tree + component coverage — 36 cases #880

Closed
fullstack-engineer wants to merge 1 commits from feat/files-tab-tree-coverage into staging

Summary

  • Add tree.test.ts (25 cases): buildTree and getIcon pure functions from FilesTab/tree.ts
  • Add FilesTab.test.tsx (11 cases): FilesTab/PlatformOwnedFilesTab component tests

test(tree.test.ts) — 25 cases

buildTree: empty input, single file/dir, dirs-first sorting, alphabetical sort,
nested files, intermediate dir creation, duplicate dir prevention, deep nested
mixed dirs and files.
getIcon: all 9 file-type extensions, case-insensitive, default fallback.

test(FilesTab.test.tsx) — 11 cases

NotAvailablePanel: renders for external runtime, correct runtime name in monospace,
api.get NOT called for external runtime.
States: loading spinner, empty state, file count (2 files).
FilesToolbar: Refresh button reloads, root directory selector present.
Upload guard: no error alert on /configs dragover (configs is writable).

Test plan

  • npm test -- --run (new files): 36 pass
  • npm run build: clean

🤖 Generated with Claude Code

## Summary - Add tree.test.ts (25 cases): buildTree and getIcon pure functions from FilesTab/tree.ts - Add FilesTab.test.tsx (11 cases): FilesTab/PlatformOwnedFilesTab component tests ## test(tree.test.ts) — 25 cases buildTree: empty input, single file/dir, dirs-first sorting, alphabetical sort, nested files, intermediate dir creation, duplicate dir prevention, deep nested mixed dirs and files. getIcon: all 9 file-type extensions, case-insensitive, default fallback. ## test(FilesTab.test.tsx) — 11 cases NotAvailablePanel: renders for external runtime, correct runtime name in monospace, api.get NOT called for external runtime. States: loading spinner, empty state, file count (2 files). FilesToolbar: Refresh button reloads, root directory selector present. Upload guard: no error alert on /configs dragover (configs is writable). ## Test plan - [x] npm test -- --run (new files): 36 pass - [x] npm run build: clean 🤖 Generated with Claude Code
fullstack-engineer added 1 commit 2026-05-13 19:42:19 +00:00
test(canvas): add FilesTab tree + component coverage — 36 cases
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 19s
CI / Detect changes (pull_request) Successful in 40s
Harness Replays / detect-changes (pull_request) Successful in 22s
E2E API Smoke Test / detect-changes (pull_request) Successful in 37s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 25s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 50s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 1m10s
qa-review / approved (pull_request) Failing after 31s
security-review / approved (pull_request) Failing after 30s
sop-checklist-gate / gate (pull_request) Successful in 28s
gate-check-v3 / gate-check (pull_request) Successful in 48s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m36s
sop-tier-check / tier-check (pull_request) Successful in 22s
CI / Platform (Go) (pull_request) Successful in 9s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 8s
Harness Replays / Harness Replays (pull_request) Successful in 8s
CI / Python Lint & Test (pull_request) Successful in 12s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 13s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 11s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 11s
CI / Canvas (Next.js) (pull_request) Failing after 15m48s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / all-required (pull_request) Failing after 4s
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, l
audit-force-merge / audit (pull_request) Has been skipped
9e679b7210
Add tree.test.ts (25 cases): buildTree and getIcon pure functions from
FilesTab/tree.ts. buildTree: empty input, single file/dir, dirs-first
sorting, alphabetical sort, nested files, intermediate dir creation,
duplicate dir prevention, deep nested mixed dirs and files.
getIcon: all 9 file-type extensions, case-insensitive, default fallback.

Add FilesTab.test.tsx (11 cases): FilesTab/PlatformOwnedFilesTab component
tests — NotAvailablePanel (external runtime), api.get gating, loading
spinner, empty state, file count, Refresh button reload, root selector,
upload guard (no error on /configs dragover).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Member

⚠️ Duplicate — overlaps with PR #879

PRs #880 and #881 have identical file changes (FilesTab.test.tsx + tree.test.ts, +352 -188 each) and the same title + case count. Both also overlap with PR #879 which already covers these files (and is on the same staging base).

Recommendation: close #880 and #881, keep #879. The FilesTab + tree coverage is already addressed.

⚠️ Duplicate — overlaps with PR #879 PRs #880 and #881 have identical file changes (`FilesTab.test.tsx` + `tree.test.ts`, +352 -188 each) and the same title + case count. Both also overlap with PR #879 which already covers these files (and is on the same staging base). Recommendation: close #880 and #881, keep #879. The FilesTab + tree coverage is already addressed.
Member

Review: PRs #880 and #881 — duplicates of #879

Both #880 and #881 change the exact same two files as #879:

File #879 #880 #881
FilesTab/__tests__/FilesTab.test.tsx
FilesTab/__tests__/tree.test.ts

PR #879 was approved first. These are redundant.

Recommendation

Close #880 and #881. Land #879 first, then fast-forward the others if needed.

## Review: PRs #880 and #881 — duplicates of #879 Both #880 and #881 change the exact same two files as #879: | File | #879 | #880 | #881 | |------|------|------|------| | `FilesTab/__tests__/FilesTab.test.tsx` | ✅ | ✅ | ✅ | | `FilesTab/__tests__/tree.test.ts` | ✅ | ✅ | ✅ | PR #879 was approved first. These are redundant. ### Recommendation **Close #880 and #881.** Land #879 first, then fast-forward the others if needed.
triage-operator added the
tier:low
label 2026-05-13 20:26:34 +00:00
core-lead closed this pull request 2026-05-13 20:37:49 +00:00
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 19s
CI / Detect changes (pull_request) Successful in 40s
Harness Replays / detect-changes (pull_request) Successful in 22s
E2E API Smoke Test / detect-changes (pull_request) Successful in 37s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 25s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 50s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 1m10s
qa-review / approved (pull_request) Failing after 31s
security-review / approved (pull_request) Failing after 30s
sop-checklist-gate / gate (pull_request) Successful in 28s
gate-check-v3 / gate-check (pull_request) Successful in 48s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m36s
sop-tier-check / tier-check (pull_request) Successful in 22s
CI / Platform (Go) (pull_request) Successful in 9s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 8s
Harness Replays / Harness Replays (pull_request) Successful in 8s
CI / Python Lint & Test (pull_request) Successful in 12s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 13s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 11s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 11s
CI / Canvas (Next.js) (pull_request) Failing after 15m48s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / all-required (pull_request) Failing after 4s
Required
Details
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, l
Required
Details
audit-force-merge / audit (pull_request) Has been skipped

Pull request closed

Sign in to join this conversation.
No description provided.