Skip to content

fix: HTTP router 404 on query params + missing first_timestamp in incremental scan#111

Open
Fruhji wants to merge 2 commits into
phuryn:mainfrom
Fruhji:fix/http-router-404-query-params
Open

fix: HTTP router 404 on query params + missing first_timestamp in incremental scan#111
Fruhji wants to merge 2 commits into
phuryn:mainfrom
Fruhji:fix/http-router-404-query-params

Conversation

@Fruhji
Copy link
Copy Markdown

@Fruhji Fruhji commented May 7, 2026

Problems

1. Dashboard returns 404 when URL has query parameters

Opening http://localhost:8080/?range=month&models=claude-sonnet-4-6 returned a 404 because do_GET compared self.path directly against "/". When the browser appends query parameters, self.path becomes /?range=... which never matched.

Fix: Parse the path with urlparse before routing so query parameters are stripped.

2. first_timestamp never updated in incremental scans

When new lines are appended to an existing JSONL file, the incremental scan updated last_timestamp correctly but never updated first_timestamp — even if a newly seen record had an earlier timestamp. This caused session duration (duration_min) to be underestimated.

Fix: Mirror the last_timestamp update logic for first_timestamp using < instead of >.

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