Feature request: Select date and time range when exporting bucket data

Open
#1,178 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

@mbelcevic is already working on this.

Since Oct 21, 2026.

  • #1179 by @mbelcevic — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
72/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
api, frontend

Research direction

Start in src/views/Buckets.vue and trace how the bucket JSON and CSV exports are requested. Check the existing event API handling of start and end parameters, then follow the export endpoints in the backend repository if available. Done means both export formats accept an optional date/time range while leaving exports unchanged when no range is supplied, with the UI converting local selections to RFC3339.

Written by the indexing model from the issue text.

Description

Problem

Currently, the Raw Data / Buckets view allows users to export an entire bucket as JSON or export its events as CSV.

For buckets containing months or years of ActivityWatch data, this can result in very large exports when only a specific period is needed.

It would be useful to allow users to select a start and end date/time before exporting.

Proposed UX

From Raw Data → bucket → Export, selecting either:

  • Export bucket as JSON
  • Export events as CSV

could open an export dialog containing:

From: [date + time]
To: [date + time]

with an option to leave the range empty to preserve the current "export everything" behavior.

Example:

Export events

From: 2026-10-20 09:00
To:   2026-10-20 17:00

[Cancel] [Export CSV]
Possible implementation

The frontend export logic currently lives in:

src/views/Buckets.vue

The existing event API already supports start and end query parameters:

GET /api/0/buckets/<bucket_id>/events?start=<RFC3339>&end=<RFC3339>

It therefore seems natural for the export endpoints to support the same optional parameters:

GET /api/0/buckets/<bucket_id>/export?start=<RFC3339>&end=<RFC3339>
GET /api/0/buckets/<bucket_id>/export/csv?start=<RFC3339>&end=<RFC3339>

If start and end are omitted, behavior would remain unchanged.

The frontend could use datetime-local inputs and convert the selected local timestamps to ISO/RFC3339 before sending them to the server.

Benefits

This would:

  • make exports significantly smaller for users with long ActivityWatch histories;
  • make it easier to export a day, week, working session, or arbitrary period;
  • avoid having to export all history and filter it afterward;
  • potentially reduce memory/processing requirements for large exports.

I'd be interested in working on this if the approach is acceptable.

Dominant language
TypeScript
Stars
157
Forks
199
Avg merge
3d 18m
Merged PRs (30d)
81

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ActivityWatch/aw-webui

All issues in ActivityWatch/aw-webui

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.