Files
PaperClipAI/ui/src
75b22e264d fix(ui): honor Project visibility on Kanban cards (#16714)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - People use task collections to track work across projects.
> - The collection has a Project visibility setting and a Kanban view.
> - The list reads that setting, but board cards receive neither the
setting nor the project metadata.
> - This pull request passes the existing preference and project map to
the board and its drag preview.
> - The benefit is that people see each known project's name and color
on the board when they enable Project.

## Linked Issues or Issue Description

Related prior work: #3686 by @levineam and #7243 by @cassioln. Both PRs
are closed without a merge. Thank you to both authors for the earlier
work on project metadata in board cards. I searched open and closed PRs
and issues before starting this focused follow-up.

**What happened?**

In the task board, enabling Project in the Columns menu does not show
the project on any card. The collection reads the saved preference for
list rows, but does not pass it or its existing project map to
`KanbanBoard`.

**Expected behavior**

A card shows its known project's name and color when Project is enabled.
Disabling Project hides the badge. Regular cards, compact cards, and the
drag preview use the same setting. A long name stays inside the card and
keeps its full text in the title. A task with no known project has no
badge.

**Steps to reproduce**

1. Create a project and a task in that project.
2. Open the Tasks collection and select board view.
3. Open Columns and enable Project.
4. Check the task card. On `master`, it still shows no project.

## What Changed

- Pass the saved Project visibility setting and the existing project map
from the collection to the board. Both the streamlined and the legacy
collection do this.
- Show a token-styled badge with the project color, a truncated name,
and the full name in its title. Use it in regular cards, compact cards,
and the drag preview.
- Cover saved enabled and disabled preferences in both collections,
badge color, unknown or unset projects, neutral color fallback, long
names, and drag-preview visibility in component tests.
- Add three Storybook fixture states.

Scope update (2026-11-11): the branch is rebuilt as one commit on
current `master` (`14cb692`). Earlier revisions also carried shared CI
repairs (CLI startup deadline, legacy heartbeat cleanup handoff, and a
scheduled-retry test wait). Those changes are not part of this fix and
are removed from this PR. The feature-map paragraph is removed too,
because routine fixes leave the maps unchanged.
`doc/SPEC-implementation.md` no longer exists on `master` (#20565), so
the spec paragraph is removed too.

## Verification

Run in a clean Node 24.22 container with `pnpm install
--frozen-lockfile`, on `9d3d138`. The current head `ed05687` only
removes the feature-map paragraph from that revision:

- `cd ui && vitest run src/components/KanbanBoard.test.tsx
src/components/IssuesList.test.tsx src/components/IssueColumns.test.tsx
--maxWorkers=1` — 3 files, 103 tests passed.
- `pnpm --filter @paperclipai/ui typecheck` — passed.
- `pnpm check:token-gates`, `node scripts/check-maps.mjs`, `node
scripts/storybook-catalog.mjs --check`, and `git diff --check` — passed.
The feature map is unchanged on the current head, per
`rules/feature-map-scope.mdc`.
- Storybook states: `product-kanban-projects--project-enabled`,
`product-kanban-projects--compact-cards`, and
`product-kanban-projects--project-disabled`. These use fixtures and do
not prove live API access or navigation.
- Earlier revisions recorded a red-before-fix run: the component suites
failed on missing project badges and missing board props before the
implementation.
- Full GitHub CI passed on head `ed05687`.

## Risks

- Low risk. The change adds an optional badge row to each board card.
- Long names truncate. The badge uses the existing neutral badge tokens.
Missing project metadata produces no badge.
- The API, stored preferences, task mutations, and drag target logic
stay the same.

## Model Used

- Original change: OpenAI Codex, GPT-based agent, with repository
search, code editing, and code execution. The runtime did not expose the
exact model ID.
- Rebase onto current `master`, scope cleanup, and the legacy-collection
follow-up: Anthropic Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code,
with tool use and code execution.

## Merge Attribution

If squash-merging, retain these trailers in the squash commit body:

```text
Co-Authored-By: Codex <codex@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
```

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green (head ed05687)
- [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
(reviewed ed05687)
- [x] I will address all Greptile and reviewer comments before
requesting merge

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Codex <codex@users.noreply.github.com>
Co-authored-by: a-vasyliev <1255946+a-vasyliev@users.noreply.github.com>
2026-12-04 23:58:50 -08:00
..
…
…