Skip to content
This repository was archived by the owner on Jun 26, 2026. It is now read-only.

Commit 7b8c744

Browse files
twoGiantsclaude
andcommitted
feat: add function list table with data layer
Wire FunctionsListPage to live data sources: a SourceControlService fetching repos from GitHub via Octokit and a ClusterService watching K8s Deployments via the OCP SDK. The page hook merges both into a unified list, deriving deployment status from K8s conditions. Add FunctionTable component with PatternFly columns for name, runtime, status, URL, replicas, and a kebab actions menu. Add placeholder Create and Edit pages with route registrations. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Stanislav Jakuschevskij <sjakusch@redhat.com>
1 parent 5176fff commit 7b8c744

27 files changed

Lines changed: 2298 additions & 187 deletions

.claude/commands/init-session.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,14 @@ Execute the startup sequence from `docs/WORKFLOW.md`. AGENTS.md is always in con
1010
## Steps
1111

1212
1. **Confirm working directory** — run `pwd`.
13-
1413
2. **Orient** — read `docs/claude-progress.txt` (only the last 3 days of entries matter) and run:
1514

1615
```bash
1716
git log --oneline --since="3 days ago"
1817
```
1918

2019
3. **Check struggles** — read `docs/agent-struggles.json`. If unresolved entries exist, present to user.
21-
2220
4. **Pick feature** — read `docs/features.json`, find first `"passes": false` entry.
23-
2421
5. **Start dev env** — run `./init.sh`.
25-
2622
6. **Run tests** — run `yarn test` and verify app is healthy.
27-
2823
7. **Wait** — tell the user you're oriented, report the picked feature and which step of the Feature Development Sequence you'd start at. When the user says to proceed, follow the Feature Development Sequence in `docs/WORKFLOW.md` step by step. Do NOT start any work autonomously.

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"typescript.tsdk": "./node_modules/typescript/lib",
3-
"editor.formatOnSave": false,
3+
"editor.formatOnSave": true,
44
"editor.codeActionsOnSave": {
55
"source.fixAll.eslint": "explicit",
66
"source.fixAll.ts": "explicit"

console-extensions.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,19 @@
2323
"path": "/functions",
2424
"component": { "$codeRef": "FunctionsListPage" }
2525
}
26+
},
27+
{
28+
"type": "console.page/route",
29+
"properties": {
30+
"path": "/functions/create",
31+
"component": { "$codeRef": "FunctionCreatePage" }
32+
}
33+
},
34+
{
35+
"type": "console.page/route",
36+
"properties": {
37+
"path": "/functions/edit/:name",
38+
"component": { "$codeRef": "FunctionEditPage" }
39+
}
2640
}
2741
]

docs/design/2026-03-16-faas-poc-design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ interface FunctionListItem {
356356
}
357357
```
358358

359-
Merge logic: iterate repos (source of truth), find matching deployment by name. Deployed functions get cluster status; undeployed functions get `status: 'NotDeployed'`. The merge function (`mergeFunctionData`) is pure and tested separately.
359+
Merge logic: iterate repos (source of truth), find matching deployment by name. Deployed functions get cluster status; undeployed functions get `status: 'NotDeployed'`. The merge function (`mergeFunctionData`) is pure, an implementation detail and tested via unit tests for `useFunctionsList` hook or the calling view.
360360

361361
---
362362

docs/features.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@
3535
"category": "functional",
3636
"description": "Function List Page renders a table with function entries",
3737
"steps": [
38-
"Navigate to /functions route",
39-
"Table renders with columns: name, runtime, status, url, replicas, actions",
40-
"Each row displays function data from hardcoded real API responses",
41-
"URL column shows shortened clickable link",
42-
"Clicking function row or edit action button redirects to /functions/edit/:name",
43-
"Actions column has edit and delete icon buttons"
38+
"SourceControlService lists function repos via Octokit (topic:serverless-function) and fetches func.yaml per repo for runtime",
39+
"ClusterService watches Deployments with label function.knative.dev/name via useK8sWatchResource, maps to DeployedFunction[]",
40+
"useFunctionListPage hook merges repos + deployments into FunctionListItem[] (repos are source of truth, undeployed get NotDeployed status)",
41+
"Table renders with columns: name, runtime, status, url, replicas, actions using PatternFly clickable rows",
42+
"Status column uses SDK components: SuccessStatus (Running), ProgressStatus (Deploying/CreatingRepo/Pushing/PushedToGitHub), ErrorStatus (Error), InfoStatus (ScaledToZero/NotDeployed), StatusIconAndText+YellowExclamationTriangleIcon (Unknown)",
43+
"URL column shows hostname-only clickable link opening in new tab",
44+
"Clicking function row or edit action navigates to /functions/edit/:name",
45+
"Delete action uses SDK useDeleteModal with custom message and Undeploy button text",
46+
"Empty state renders when no functions exist, spinner while loading"
4447
],
4548
"passes": false
4649
},

0 commit comments

Comments
 (0)