mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-27 23:25:22 -04:00
feat(notes): per-item Agent: solve button on todo hover
Adds a hover-revealed agent button next to each todo item's X button,
mirroring the existing per-note "Agent: solve this" affordance but
scoped to a single checklist item. Clicking it creates a new chat
session named "Agent: {item text}", kicks off the agent run in the
background (user stays in notes), and links the latest run to the
parent note via agent_session_id so the existing Agent tag opens the
chat — same review path as the per-note solve.
The prompt is "Help me with this todo: {item text}" plus the note
title as one-line context when present, so the agent has enough
framing without being handed the whole note.
Why per-item: granular delegation is the main user-facing missing
piece. Today you can hand a whole note to the agent, but if the note
has 5 todos and only one needs agent attention, you either solve all
five or none. Per-item closes that gap without changing the existing
per-note flow.
UI:
- New .note-checkbox-agent button in the item template, placed before
the X so DOM order is text → agent → X.
- Reuses the existing robot SVG (same icon as the corner-menu Agent
item) at 10x10 to match the X visually.
- CSS mirrors .note-checkbox-rm exactly: hidden until item hover,
opacity 0.55 on item hover, opacity 1 + accent on button hover.
- Hidden in select mode and in the same _INTERACTIVE/skip-click lists
as the X so card clicks don't fire.
Backend: none — uses existing /api/session + /api/chat_stream agent
mode. No DB schema change. agent_session_id is latest-wins on the
parent note (matches existing per-note behavior).
Targets `dev`. Visual change — needs a browser test before promoting
to main.
This commit is contained in:
@@ -32126,6 +32126,30 @@ body.notes-mobile-mode.notes-drag-mode .note-card-pin.active {
|
||||
.note-checkbox:hover .note-checkbox-rm { opacity: 0.55; }
|
||||
.note-checkbox-rm:hover { opacity: 1 !important; color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
|
||||
.note-card-selectmode .note-checkbox-rm { display: none; }
|
||||
|
||||
/* Per-item "solve with agent" button — mirrors .note-checkbox-rm visually
|
||||
so the two hover-actions on a todo item read as a pair. Sits to the left
|
||||
of the X (DOM order = agent then X), both pushed to the right via the
|
||||
shared margin-left:auto pattern. */
|
||||
.note-checkbox-agent {
|
||||
flex: 0 0 auto;
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: var(--fg);
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
padding: 2px;
|
||||
border-radius: 3px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: auto;
|
||||
margin-right: 0;
|
||||
transition: opacity 0.12s, background 0.12s, color 0.12s;
|
||||
}
|
||||
.note-checkbox:hover .note-checkbox-agent { opacity: 0.55; }
|
||||
.note-checkbox-agent:hover { opacity: 1 !important; color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
|
||||
.note-card-selectmode .note-checkbox-agent { display: none; }
|
||||
.note-check-dot {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
|
||||
Reference in New Issue
Block a user