feat(app): GET /api/surfaces/recent — post-grained recent surfaces#173
Draft
benvinegar wants to merge 1 commit into
Draft
feat(app): GET /api/surfaces/recent — post-grained recent surfaces#173benvinegar wants to merge 1 commit into
benvinegar wants to merge 1 commit into
Conversation
Post-grained source for cross-session feeds (Org Home + per-workspace Home), distinct from the session-grained /api/sessions. Caps oversized inline text parts (truncated:true) while images stay by-reference (assetId); same auth as /api/sessions (not broadened on a session-scoped publicRead board). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
GET /api/surfaces/recent?limit=to the workspace app: the N most-recently-updated surfaces (posts) across all sessions, newest first — a post-grained source for cross-session "latest posts" feeds, distinct from the session-grainedGET /api/sessions.Each item carries its
sessionId,sessionTitle,agent,title,partKinds, timestamps, andpartswith oversized inline text capped server-side (8000 chars,truncated: trueflag) while images stay referenced byassetId. So a client can render a real, clipped preview cheaply and load the full post on click.listRecentPosts(limit)added to theStoreinterface and implemented in bothSqlStore(ORDER BY updatedAt DESC LIMIT ?) andJsonFileStore; covered by the sharedstoreContractso both backends are exercised./api/sessions. Fixes a latent public-read over-match —/api/surfaces/recentis explicitly excluded from the/api/surfaces/public prefix so it isn't exposed on session-scoped boards.test/surfaces-recent.test.ts(ordering, limit clamp, truncation, assetId passthrough, auth). Changeset (minor). 389/389 tests pass.🤖 Generated with Claude Code