mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 10:48:20 +01:00
fix(projects): drop "Add context →" placeholder on bare project cards
Bare projects (no description, no status, no maturity, no health signals, no next_step, no extra attrs) rendered a dashed-bordered "Add context →" box at the bottom of every tile. Caught during a live cloud audit: in a 29-tile grid, every empty card had this prompt dominating the visual — looked like a row of empty form placeholders instead of a project portfolio. The placeholder added zero data; the whole card is already clickable via the wrapper's onClick, so the affordance to open and add context is preserved. Bare tiles now show just the title (+ readonly badge, action icons), which reads as "this project exists, click to learn more" — same affordance, less visual noise. extraAttrs path is untouched: when the user HAS set custom attrs beyond the reserved set, those still render as micro-badges. Smaller follow-up worth filing separately: surface dirPath + agentPref from user_projects so even bare-attr tiles show concrete metadata. That requires a query-level join (entities ⨝ user_projects) — not in this commit.
This commit is contained in:
1 file changed
+13
-14
@@ -142,21 +142,20 @@ function ProjectCard({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{!status && !maturity && !hasIssues && !nextStep && (
|
||||
extraAttrs.length > 0 ? (
|
||||
<div className="flex flex-wrap gap-1.5">
|
||||
{extraAttrs.slice(0, 2).map(([key, value]) => (
|
||||
<span key={key} title={`${key}: ${value}`} className="ui-micro-badge rounded-full border-border-default bg-surface-overlay text-text-tertiary">
|
||||
{String(value).slice(0, 30)}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div className="rounded border border-dashed border-border-default px-2.5 py-2 text-center">
|
||||
<span className="text-xs text-text-muted">Add context →</span>
|
||||
</div>
|
||||
)
|
||||
{!status && !maturity && !hasIssues && !nextStep && extraAttrs.length > 0 && (
|
||||
<div className="flex flex-wrap gap-1.5">
|
||||
{extraAttrs.slice(0, 2).map(([key, value]) => (
|
||||
<span key={key} title={`${key}: ${value}`} className="ui-micro-badge rounded-full border-border-default bg-surface-overlay text-text-tertiary">
|
||||
{String(value).slice(0, 30)}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
{/* No empty-state placeholder: a card with only a title is less ugly
|
||||
than a card with a dashed-bordered "Add context →" prompt that
|
||||
dominates the visual when the user is scanning 20+ tiles. The whole
|
||||
card is already clickable (onClick on the wrapper) so the affordance
|
||||
to open the project is preserved. */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user