---
name: infinibot-ui-projects-view
description: Locate and safely extend the InfiniBot web UI projects view, avoiding the two-project-type-system trap
---
# Editing the InfiniBot Web UI Projects View
## When to use
- A task asks to modify, filter, toggle, or extend the "projects" view/dashboard in the InfiniBot web UI (`ui/src/ui/`).
- You need to work with project hierarchy (sub-projects / parent projects) in the web UI.
- A request references a `projects.*` view file that does not appear to exist.
## How to apply
1. Do NOT assume the file is named `projects.ts`. The actual view is `ui/src/ui/views/projects-dashboard.ts` (block editor helper: `ui/src/ui/views/project-content-editor.ts`). Grep for the rendering logic rather than the filename.
2. Identify which of the TWO distinct project type systems the task needs:
   - `KanbanProject` (defined in `ui/src/ui/types.ts`) — used by gallery/kanban views (`kanban.ts`, `autonomy.ts`, `focus.ts`, etc.). **This is the one with the `parentProjectId?: string` field** for sub-project hierarchy.
   - `ProjectSession` (defined in `ui/src/ui/controllers/projects.ts`) — used by `projects-dashboard.ts`. **It has NO parent reference field.**
3. For any sub-project / parent-child hierarchy feature, you must work with `KanbanProject.parentProjectId`. If the target view only has `ProjectSession`, parent data is not available there — confirm the data source before filtering by hierarchy.
4. Match existing header/toggle button styling already present in the view instead of inventing new markup. Filter the rendered list (top-level = no `parentProjectId`) rather than mutating the underlying data.
5. Spawn an Explore agent first to confirm the exact file path, type import, and current render/filter logic before editing — the naming is non-obvious.
## Rules
- Never create a new projects view file; extend `projects-dashboard.ts`.
- Never assume `projects.*` exists — the view is `projects-dashboard.ts`.
- Always determine whether the view uses `KanbanProject` or `ProjectSession` before touching hierarchy logic; only `KanbanProject` carries `parentProjectId`.
- Always filter for display; do not delete or reparent projects to implement a hide/show toggle.