Skip to content

Conversation

@gustafeden
Copy link
Collaborator

Summary

Shows "did you know" facts during long-running agent operations. Facts are pre-loaded from a remote source at startup and displayed after 4 seconds of activity.

Stacked on PR #5 (feature/haiku-core-clean)

What's Included

New Files

  • lib/modules/haiku/fact_source_service.dart - Singleton service for fetching/storing facts
  • lib/modules/agent_network/mixins/activity_tip_mixin.dart - Timer logic with minimum display duration

Modified Files

  • lib/main.dart - Non-blocking initialization of FactSourceService
  • lib/modules/agent_network/network_execution_page.dart - Mixin integration + UI display

User-Visible Behavior

  1. After 4 seconds of agent activity, a fact appears in green text below input
  2. Facts stay visible for minimum 8 seconds (prevents flickering)
  3. Works during both response streaming AND waiting for sub-agents
  4. Facts don't repeat within a session until all have been shown

Technical Details

  • Data source: Remote JSON endpoint (pre-loaded at startup)
  • Graceful degradation: Silent failure if fetch fails
  • Two-timer coordination: Activity threshold + minimum display duration
  • Session deduplication: Tracks shown facts to avoid repeats

Test Plan

  • Wait 4+ seconds during agent response, verify tip appears
  • Verify tip stays visible for at least 8 seconds
  • Verify tip clears after activity stops (respecting minimum duration)
  • Verify facts don't repeat within session

🤖 Generated with Claude Code

Gustaf Eden and others added 2 commits January 7, 2026 10:10
Shows "did you know" facts after 4 seconds of agent activity.
Facts are pre-loaded from remote source at startup.
Minimum 8-second display duration prevents flickering.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move activity tip display from above input to below the prompt
- Increase minimum display duration from 8 to 10 seconds
- Fix tip disappearing immediately when agent finishes - now respects
  minimum duration timer before clearing
- Remove unused import and variable

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gustafeden gustafeden force-pushed the feature/haiku-core-clean branch from abbdb95 to 92c779f Compare January 7, 2026 09:26
@gustafeden gustafeden force-pushed the feature/activity-tips-clean branch from 27c62ff to 03fdbdb Compare January 7, 2026 09: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.

1 participant