ActivityWatch / ActivityWatch/aw-webui

Improve the single-pass activity-analysis context

Đang mở
#925 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
151
Fork
179
Merge trung bình
1 ngày 20 giờ
Pull request đã merge (30 ngày)
28

Mô tả

## Context

Follow-up from ActivityWatch/aw-webui#922. The dev-mode `/analysis/activity` prototype currently sends only total tracked duration plus the top 20 applications to a single-pass LLM. Because that model has no ActivityWatch tools, the compact context needs to carry enough structure for a useful answer without sending raw personal event data.

## Proposed context shape

Build on the existing canonical-query / aggregation seam and include:

- active time after AFK filtering, plus tracked-vs-active coverage
- top applications with duration, share, and distinct-title count
- top browser domains with duration and share (when browser URL data exists)
- category rollups using the user's ActivityWatch categorization rules
- daily distribution (per-day active time) and focus fragmentation signals such as app switches / longest sustained block
- explicit date range, host(s), timezone, and truncation/coverage notes

Keep each section bounded and inspectable in the UI before generation. Derive statistics locally; do not send raw titles or URLs by default.

## Acceptance criteria

- [ ] Define a typed provider-independent summary input shape
- [ ] Fetch through ActivityWatch's query infrastructure rather than downloading an uncapped raw bucket where practical
- [ ] Apply AFK filtering and user category rules
- [ ] Add top domains and title-count metadata without exposing full URLs/titles
- [ ] Add bounded temporal/focus statistics with clear definitions
- [ ] Show the exact compact context sent to the provider
- [ ] Add unit tests for aggregation, missing buckets/rules, percentage denominators, and truncation
- [ ] Document which fields may contain sensitive information

This should be a follow-up, not scope-creep in ActivityWatch/aw-webui#922.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.