8000 feat(playlists): keep moments as clips and play them back to back by adeelahmad · Pull Request #685 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(playlists): keep moments as clips and play them back to back - #685

Merged
adeelahmad merged 2 commits into
mainfrom
claude/project-thread-xfmkzn
Oct 19, 2026
Merged

adeelahmad merged 2 commits into
mainfrom
claude/project-thread-xfmkzn

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: a good moment in a recording could be highlighted, but there was no way to gather moments from several resources and play them in order.

After: you can keep a moment of any recording, video or document as a clip, with a title and a note. Select words in a transcript and choose Add to playlist, or add a highlight from its tab. One click puts it at the end of the playlist you used last (a new one called Clips when you have none), with Undo. The new Playlists page lists yours and the ones others shared. A playlist's page plays its clips back to back on each resource's own audio or video, reorders them by dragging or with Up and Down, and takes one out with Undo. A shared playlist shows each reader only the clips of resources they can read. Agents use /api/v1/playlists and the MCP tools list_playlists and add_to_playlist.

How: the first commit adds the playlist and clip tables, routes, MCP tools and clean-up (deleting a resource removes its clips; removing an account removes their playlists). The second adds Add to playlist in the transcript and highlights and the Playlists pages.

Motivation and Context

Item from the personal feature plan sheet (clips and playlists).

Screenshots (if appropriate):

n/a

Steps to reproduce (if appropriate):

Select a sentence in a transcript and choose Add to playlist, do the same in another recording, then open Playlists → Clips and press Play: both moments play one after the other.

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 (tests/api/test_playlists.py, tests/api/test_mcp.py, __tests__/playlists-model.test.ts, __tests__/playlist-page.test.tsx, __tests__/recording-comments.test.tsx).
  • My change requires documentation updates, and I have updated docs/ accordingly (docs/playlists.md).
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md. Written as changelog.d/clips.md, per build(release): changelog fragments in changelog.d/ instead of one Unreleased section #581.

Done questions (AGENTS.md)

  • Goal: delivers what the user wanted, merged on green CI.
  • Agents: usable through the API, MCP or an assistant tool. /api/v1/playlists, MCP list_playlists and add_to_playlist.
  • Zero setup: no new prerequisite, .env edit or manual step.
  • Fewest clicks and keystrokes. One click adds to the last playlist used; Undo instead of confirm.
  • Configurable: new settings in the web app with defaults; wizard asks only what is required. n/a: no settings.
  • Light: default install still runs on a Raspberry Pi with cloud models. Plays each resource's own audio or video; no new processing.
  • Private and secure: data local and encrypted, passkeys, threat model updated. A shared playlist shows each reader only the clips of resources they can read.
  • Cost: cheapest path, model calls in the activity ledger, budgets respected. n/a: no model calls.
  • User decides: consequential or new actions wait for the user; defaults unchanged.
  • Upgrades: existing installs upgrade safely (upgrade step for stored-data changes). New tables only; nothing to do when upgrading.
  • Honest: sources cited; labelled built, in progress or planned. README built list and docs/requirements.md name the checks.
  • Tests, docs and generated files updated (make openapi).
  • Open standards; dependencies keep Lens MIT. n/a: no dependencies.
  • Result reported with evidence; "refine later" items written down.
  • Reuse: existing Lens code and permissive libraries reused, nothing reinvented. Reuses highlights, the player and Undo.

Local CI: the container ran several times slower than usual, so I ran the changed tests directly. test_playlists.py, test_mcp.py, test_delete.py, test_setup_assistant.py and test_scaling_agents.py passed (46 passed), ruff is clean, the threat model validator agrees and make openapi shows no drift. GitHub CI decides the merge.


Generated by Claude Code

Playlists hold clips: a moment of any resource (t0 to t1, with a title,
a note and the words picked), or a highlight's passage and label. A
playlist is its maker's, private until shared; each reader gets only
the clips of resources they can read, each with the resource's signed
media link as the recording player gets it. The API adds, reorders and
removes clips (Undo adds one back at its position), and agents list
playlists and add moments over MCP, to the one used last by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QFUNzy1QZy5HhKAyJxTAYJ
@adeelahmad adeelahmad self-assigned this Oct 19, 2026
…lay it 
8000
back to back

Add to playlist in the selection toolbar and beside each highlight keeps
the moment as a clip in the playlist used last (a new one called Clips
when there is none), with Undo. The Playlists page lists yours and the
shared ones; a playlist's page plays its clips back to back on each
resource's own audio or video, reorders them by dragging or with Up and
Down, and takes one out with Undo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QFUNzy1QZy5HhKAyJxTAYJ
@adeelahmad
adeelahmad force-pushed the claude/project-thread-xfmkzn branch from a01e590 to d47d236 Compare October 19, 2026 14:10
@adeelahmad
adeelahmad merged commit 84f7bb5 into main Oct 19, 2026
12 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-xfmkzn branch October 19, 2026 14:26
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