arrow_backRetour aux issues
HafidIdrissi/Time-Tracker
#20
Débutant
Ouvrirarrow_forward
Débutant
Ouvrirarrow_forward
Débutant
Ouvrirarrow_forward
Expand longest active-session analytics coverage
ecoDébutant
enhancement
help wanted
good first issue
descriptionDescription
## User problem
The dashboard defines a continuous session as active periods separated by no
more than 30 seconds, while any idle period ends the session. Only one broad
analytics scenario currently covers this calculation.
## Expected result
Add focused unit tests that document the exact session boundaries and protect
the metric from regressions.
## Likely files
- `tests/test_analytics.py`
- `timetracker/analytics.py` only if a test reveals a defect
## Acceptance criteria
- Cover an empty period list and a single active period.
- Verify that a gap of exactly 30 seconds stays in the same session.
- Verify that a gap greater than 30 seconds starts a new session.
- Verify that an idle period always ends the current session.
- Cover overlapping active periods without double-counting elapsed time.
- Pass periods in unsorted order and verify deterministic output.
- Assert elapsed session time rather than the sum of stored durations.
## Test command
```powershell
python -m unittest tests.test_analytics -v
python -m unittest discover -v
```
Issues similaires
calkit/calkit
star53
Poids du dépôt moyen
VS Code extension should be robust to YAML parser errors
Seeing this error: ``` Failed to read calkit.yaml: YAMLParseError: A block sequence may not be used as an implicit map…
Python
bug
good first issue
fu351/Doberman-Core
star211
Poids du dépôt léger
dash: a manual Refresh control
The dashboard polls: `refreshStats()` (`src/doberman/dash/app.py:408`) every 5 s and `refreshPending()` (`:546`) every …
Python
enhancement
good first issue
fu351/Doberman-Core
star211
Poids du dépôt léger
dash: "Copy details" button on each pending-approval card
Each pending-approval card in the dashboard (`renderPending`, `src/doberman/dash/app.py:448-544`) shows the risk badge,…
Python
enhancement
good first issue