Commit graph

21 commits

Author SHA1 Message Date
Himanshu Dongre
c65e913666 Pass force=true from the web UI space-delete confirmation
The backend now refuses DELETE /api/v2/repos/{id} with 409 for a space
that still holds checkpoints unless force=true is passed. The web UI's
delete-space request did not send it, so deleting a non-empty space from
the browser failed (it failed safe — nothing was deleted).

deleteRepo() gains an optional { force } argument, mirroring the sibling
deleteCommit()'s { cascade }. WorkspaceOverviewPage passes force=true from
the ConfirmDeleteModal's onConfirm — the point where the user has already
acknowledged the irreversible "this cannot be undone" confirmation. No
modal or UX change; only the request now carries the flag the backend
requires.
2026-05-19 20:41:33 +05:30
Himanshu Dongre
76f6f4c2c7 Polish external validation output and docs 2026-05-17 12:15:14 +05:30
Himanshu Dongre
83e7aa15cb Fix pre-existing frontend TypeScript build errors
Type the commit metadata blob — new Note and CommitMetadata interfaces
in types/index.ts — so commit.metadata.notes resolves to Note[] instead
of unknown. This fixes the three CommitDetailPage errors where .length,
.map, and the JSX child type all failed against an unknown/{}-typed
notes field.

Normalize the structured-task list to strings at the rows() call in
ChatWorkspacePage so the string-list renderer receives string[] rather
than (string | StructuredTask)[].

No behavior change. npm run build (tsc -b + vite build) and tsc --noEmit
are now clean.
2026-05-16 21:23:35 +05:30
Himanshu Dongre
ef8faf6e4d Add Project Current State endpoint and UI panel
Add GET /api/v5/current/spaces/{id} — a packaged, computed-on-demand
snapshot of where a space is right now: current direction, counts,
attention signals (open questions, divergence, active work), active
work claims, open tasks grouped by intent, recent milestones, and
recent activity. Shared payload contract with the smriti current CLI
surface built in parallel.

Render it as the ProjectCurrentState panel at the top of LineagePage,
replacing the hand-rolled current-state summary. Extract a shared
_get_active_claims helper so the state and current endpoints report
active work identically. No schema changes.
2026-05-16 20:01:16 +05:30
Himanshu Dongre
4625b5138a Add real screenshots to README and fix CommitDetailPage diff crash
Captured three screenshots for the README using playwright against
the live local environment:
- lineage-dashboard.png — real LineagePage showing 56 checkpoints,
  summary panel, needs-attention signal, author badges
- checkpoint-detail.png — the autonomy milestone checkpoint with
  structured tasks (intent badges), entities, and founder notes
- cli-state-and-metrics.png — terminal-styled render of real CLI
  output from smriti state --compact and smriti metrics

Fixed a crash in CommitDetailPage exposed by the screenshot attempt:
diffList was typed list[str] but tasks are now structured objects
after the task IDs feature landed. React threw "Objects are not
valid as a React child" when trying to render the diff result.
Fix normalizes tasks to their text field before diffing.

README now references real images instead of inline code blocks.
TypeScript clean, 331 tests pass.
2026-04-14 15:04:58 +05:30
Himanshu Dongre
73f26e721c Add structured tasks with intent hints for autonomous work selection
Tasks in checkpoints evolve from flat strings to objects with optional
intent_hint (implement/review/investigate/docs/test), blocked_by
(dependency label), and status (open/done). Agents reading the state
brief can now self-select complementary work by matching task intents
against active claim intent_types — no founder routing needed.

Backward-compatible: old string tasks normalize at render time. No
schema migration. JSONB handles both shapes. Skill pack v1.7 teaches
the autonomous selection reflex.
2026-04-13 22:27:32 +05:30
Himanshu Dongre
91d93becfa Harden lineage note indicator semantics 2026-04-13 20:44:07 +05:30
Himanshu Dongre
f8e5012f64 Add needs-attention signal to LineagePage summary panel 2026-04-13 20:28:12 +05:30
Himanshu Dongre
64b158e4c8 Add note indicators to LineagePage checkpoint cards 2026-04-13 19:25:43 +05:30
Himanshu Dongre
9b109ae94c Add checkpoint notes: additive founder annotations with kind (note/milestone/noise) 2026-04-13 19:10:37 +05:30
Himanshu Dongre
44db645460 Add --since freshness parameter to smriti state for pull-time staleness detection 2026-04-13 18:05:05 +05:30
Himanshu Dongre
4c7241fff7 Add current-state summary panel and fix getSpaceState API path 2026-04-13 17:41:14 +05:30
Himanshu Dongre
8d01e1e866 Surface active work claims and branch disposition in LineagePage 2026-04-13 17:22:33 +05:30
Himanshu Dongre
28dbdedae9 Show author_agent in LineagePage checkpoint cards 2026-04-12 10:48:15 +05:30
Himanshu Dongre
73c71b4c9d Add delete endpoints for spaces, checkpoints, and sessions
Two rounds of agent-handoff dogfood testing surfaced that Smriti had no
way to delete spaces, sessions, or checkpoints via any surface. This
adds DELETE endpoints to the V2/V4 API, new CLI commands, and UI
affordances on the workspace overview and chat history panel so the
daily cleanup path does not require opening a Python shell.

Checkpoint delete refuses with 409 Conflict when child commits or
forked sessions reference the target, because silently orphaning them
would cause walk_ancestors to collapse lineage and forked sessions to
lose isolation. The refusal is escaped via ?cascade=true on the API,
--cascade on the CLI, and a two-step confirm with a dependents list
plus checkbox in the UI modal.

Space delete relies on the existing DB-level cascade chain from the
earlier commit/session/turn migrations — no new Alembic migration is
needed. Session delete cascades turn events but preserves commits
authored by the session, since commits are space-owned artifacts.

14 integration tests cover cascade correctness, 409 refusal, the
cascade escape hatch, cross-user 404s, subtree ordering, and
idempotency. Existing tests pass unchanged (143/143).
2026-04-11 17:25:36 +05:30
Himanshu Dongre
9408fae00c Add workspace overview landing page
Replace the auto-session landing behavior with a resume-focused
overview at /. When returning after a break, the root page now
shows the most recent checkpointed session as a Resume card with
its current objective and last checkpoint summary visible, plus
cards for other recent spaces. New sessions explicitly go through
/sessions/new instead of being created on bare /.
2026-04-10 23:30:45 +05:30
Himanshu Dongre
1eea01d949 Compose drift, review, and restore into one flow
Surface a soft drift hint in the chat header when many turns have
passed since the last checkpoint (turn-count based, not semantic).
Add a Restore action to the checkpoint detail panel as a peer to
Review, so users can act on a checkpoint without leaving the
inspection flow. When review surfaces issues, show an inline
Continue from this checkpoint button so recovery is one click away.
2026-04-10 17:54:20 +05:30
Himanshu Dongre
d01a180975 Add artifact-aware checkpoints
Checkpoints can now hold attached artifacts — text content captured
from chat messages or added manually. Artifacts are included in
prompt context when a checkpoint is active, grounding reasoning in
actual content rather than just summaries. Add capture button on
messages, artifact management in checkpoint modal, and collapsible
artifact display in checkpoint detail.
2026-04-04 21:35:41 +05:30
Himanshu Dongre
2f155e8dcc Add checkpoint review and assumptions field
Separate assumptions from decisions as a first-class checkpoint
field. Add review endpoint that surfaces reasoning consistency
issues: contradictions, hidden assumptions, resolved questions,
and unused entities. Extend draft extraction, prompt context,
and compare diff to include assumptions.
2026-04-04 21:07:41 +05:30
Himanshu Dongre
97b7845cb5 Improve checkpoint restore UX with visual state transitions
Rename mount/unmount flow to restore/exit restore. Add visual
restore boundary divider in chat timeline. Dim pre-restore turns
to make isolation visually obvious. Show contextual empty state
and one-time hint for restored context.
2026-04-04 20:33:30 +05:30
Himanshu Dongre
befea97bf6 Initial public release 2026-03-22 13:48:50 +05:30