Skip to content

Conversation

@2witstudios
Copy link
Owner

Summary

Refactored the pulse summary generation system to provide richer, more contextual information to the AI model, enabling more meaningful and specific workspace updates. The system now aggregates actual page content, full message text, and colleague activity patterns instead of just counts.

Key Changes

  • Richer Context Data: Restructured the context object passed to the AI to include:

    • Actual page content previews and snippets
    • Full direct message and chat content (not just counts)
    • Aggregated colleague activity with edit counts and specific operations
    • Team member information and workspace structure
    • Detailed task information with priorities and due dates
  • Improved AI Prompts: Completely rewrote the system prompt to:

    • Encourage the AI to use rich context for specific, meaningful summaries
    • Guide the model to reference actual content and messages rather than generic counts
    • Promote natural, conversational tone with real examples
    • Emphasize connecting dots between activities and noticing patterns
  • Better Activity Aggregation:

    • Changed from simple counts to detailed activity tracking by person and page
    • Tracks edit counts, operation types, and timestamps for each activity
    • Filters and sorts activities by relevance (48-hour window)
    • Separates colleague activity from user's own activity
  • Expanded Data Collection:

    • Added drives table import for workspace context
    • Replaced notifications with chatMessages for page-level discussions
    • Removed unused SQL utilities (sql, count)
    • Extended time windows (24-48 hours) for better activity context
  • Simplified Time Windows: Replaced complex date calculations with clearer 24/48-hour windows for consistency

Implementation Details

The context data now flows through the system in a more structured way:

  1. Gathers workspace metadata (drives, team members)
  2. Aggregates raw activity logs into meaningful patterns
  3. Fetches actual page content for active pages
  4. Collects full message and chat content
  5. Includes task details with priorities
  6. Passes all this rich context to the AI for intelligent summarization

The database schema for contextData in pulseSummaries is maintained for backward compatibility while the internal context object is significantly enhanced.

https://claude.ai/code/session_01MzgqCneugAdEMYGZcb1iub

The Pulse feature was generating robotic, stats-focused summaries like
"You've completed 5 tasks this week" which provides no useful context.

This change transforms Pulse into a friendly workspace companion that:
- Tells users what people are ACTUALLY working on (not just counts)
- Includes drive/project context for better awareness
- Uses conversational tone like a colleague catching you up
- Focuses on interesting/relevant info, not data dumps
- Extends activity window to 24h for "what you missed" context
- Increases message preview length from 100 to 300 chars

Examples of the new style:
- "Noah's been working on the Product Roadmap - looks like he added the Q2 timeline"
- "Alex shared the Marketing Brief with you, and Sarah was asking about the launch date"

Instead of the old style:
- "You have 5 tasks and 26 pages were updated this week"

https://claude.ai/code/session_01MzgqCneugAdEMYGZcb1iub
…ted activity

Major enhancement to Pulse data gathering to give the AI a real understanding
of the workspace instead of just stats:

**Rich Context Now Includes:**
- Actual page content snippets (1500 chars) for recently active pages
- Aggregated activity by person+page (shows "Noah made 15 edits" not 15 separate logs)
- Full DM message content (no truncation)
- Page chat messages from collaborators
- Team member lists per drive
- 48-hour activity window for better "what you missed" context

**Intelligent Aggregation:**
- Groups autosave edits into meaningful summaries
- Separates own activity from colleagues' activity
- Sorts by engagement level (most active pages first)
- Dedupes redundant activity entries

**New System Prompt:**
- Instructs AI to use page content to understand WHAT people are working on
- Encourages connecting dots between related activities
- Examples show specific, contextual summaries like "Noah added the Q2 timeline"

The AI now has 10-20k tokens of real context to work with, enabling summaries
that feel like a colleague who's been paying attention.

https://claude.ai/code/session_01MzgqCneugAdEMYGZcb1iub
…ounts

- Import and use existing diff utilities from @pagespace/lib/content
- Fetch activity logs with contentRef and contentSnapshot for diff generation
- Use groupActivitiesForDiff to collapse autosave operations into meaningful groups
- Use resolveStackedVersionContent to get before/after content pairs
- Generate unified diffs within budget using generateDiffsWithinBudget
- Pass actual content diffs (+ lines = additions, - lines = deletions) to AI
- Update system prompts to explain how to read and summarize diffs
- AI now summarizes the substance of changes instead of counting edits

Example output transformation:
- Before: "Noah made 15 edits to the Roadmap"
- After: "Noah added a Q2 section to the Roadmap covering API migration timeline"

https://claude.ai/code/session_01MzgqCneugAdEMYGZcb1iub
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 2, 2026

Warning

Rate limit exceeded

@2witstudios has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 40 minutes and 56 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/fix-pulse-truncation-P2QDB

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@2witstudios 2witstudios merged commit 24cf497 into master Feb 2, 2026
3 checks passed
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.

3 participants