8000 feat(timeline): mark activities reviewed, important or hidden by adeelahmad · Pull Request #432 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(timeline): mark activities reviewed, important or hidden - #432

Merged
adeelahmad merged 1 commit into
mainfrom
claude/project-thread-mx8h9c
Oct 15, 2026
Merged

adeelahmad merged 1 commit into
mainfrom
claude/project-thread-mx8h9c

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: the stream of activities could be read newest first, but nobody could keep track of what they had already looked at.

After: each person marks activities reviewed, important or hidden for themselves alone, and filters the timeline by those marks ("unreviewed only", "important", leave out hidden). Agents do the same: the MCP tool mark_activities and unreviewed on timeline, and the assistant's mark_activities.

Workflow studio M10, step 1 (marks, backend). The /timeline page, Home's Latest card and the nav entry come in the next PRs.

How:

  • event_mark:<hash of account and activity> rows (the id keeps each pair unique; a composite UNIQUE index on the two finds nothing for account = $a alone on the embedded engine, so there is an index on account). A row with every flag cleared is deleted.
  • POST /api/v1/activities/{id}/mark and POST /api/v1/activities/mark (up to 500, answers {marks, unknown}); GET /api/v1/activities has your marks on the page in marks and takes reviewed, important, hidden.
  • The mark filters are joined per source page, not per row: events.page takes a keep(activities) -> ids hook called once for each source page it reads.
  • events.get_many (one look per source for many ids; Source.get_many defaults to one get each, and the recordings and log sources read all of them in one query) checks the ids a person may see before marking.
  • The assistant marks at once, except that after reading text from outside Lens (the timeline's own titles count) hiding or marking reviewed asks first, since that text could have asked to take things out of the person's sight.
  • Marks go when the person is removed (auth.remove_account).

Defaults taken: the API shows hidden activities unless hidden=false is given (the page will pass it), so nothing changes for anyone who doesn't mark.

Motivation and Context

Workflow studio plan, M10 (Timeline): the "mini feed" Adeel asked for needs per-person review marks.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests.
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md. (n/a: the title says it)

Done questions (AGENTS.md)

  • Goal: marks and filters are delivered here; the page that uses them follows in the next PRs of M10. Merged on green.
  • Agents: REST, MCP mark_activities and timeline unreviewed, the assistant's mark_activities.
  • Zero setup: a new table defined with IF NOT EXISTS; nothing to do.
  • Fewest clicks and keystrokes: n/a for the API; the page brings keys r/i and "mark all shown" with undo.
  • Configurable: no new settings.
  • Light: one small table, read in one query per page.
  • Private and secure: marks are per person, set only by them (write scope), only on activities they can see; no new outside surface. The studio's threat-model pass is M12's.
  • Cost: no model calls.
  • User decides: the assistant asks first before hiding or marking reviewed after reading outside text; defaults unchanged.
  • Upgrades: a new table only; nothing existing changes shape.
  • Honest: docs/timeline.md labels marks built and the page, Home card and "what this caused" planned.
  • Tests, docs and generated files updated (make openapi).
  • Open standards; no new dependencies.
  • Result reported with evidence; "refine later" items in docs/timeline.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TuKmkGM2u3919KZMZLfDCK


Generated by Claude Code

Each person marks activities of the timeline for themselves alone:
POST /api/v1/activities/{id}/mark and /activities/mark (up to 500),
your marks on each page in `marks`, and reviewed, important and hidden
filters joined per source page rather than per row. The MCP tool
mark_activities and `unreviewed` on timeline; the assistant's
mark_activities asks first to hide or mark reviewed after reading
outside text. Marks go when the person is removed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TuKmkGM2u3919KZMZLfDCK
@adeelahmad adeelahmad self-assigned this Oct 15, 2026
@adeelahmad
adeelahmad merged commit 127cd18 into main Oct 15, 2026
10 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-mx8h9c branch October 8000 15, 2026 22:33
adeelahmad added a commit that referenced this pull request Oct 16, 2026
Automations merged (#432 to #464): the stream now holds every kind of
activity, the Timeline page reviews it, and automations act on it with
triggers, conditions, actions, approvals, limits and budgets, made by
agents over MCP and in the assistant or drafted from a sentence. Say so
under Automate it, with the studio labelled planned as
docs/automations.md does; add the open RSS feeds (#453) and condition
operators (#434) to In progress; link the timeline from the docs index.


Claude-Session: https://claude.ai/code/session_01HDx7PPUauyjMn1LZs8JAsS

Co-authored-by: Adeel Ahmad <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0