browser_tab_title: suffix-only window title is not normalized to "(Untitled tab)"
Débutant
bughelp wantedgood first issue
2 ★
Poids du clone léger
Mise à jour
Description
In `timetracker/analytics.py`, `browser_tab_title()` calls `strip()` on the window title **before** comparing it against the known suffixes. Every entry in `BROWSER_SUFFIXES` starts with a space (for example `" - Google Chrome"`).
As a result, a window title that consists of nothing but a suffix becomes `"- Google Chrome"` after `strip()`, no longer matches any entry, and is returned as-is instead of being normalized to `"(Untitled tab)"`.
**Reproduction**
```
>>> browser_tab_title("chrome.exe", " - Google Chrome")
'- Google Chrome' # expected: '(Untitled tab)'
```
**Background**
Spotted while reviewing #10. A test case covering this situation was written, then removed in commit 3ca0980 to match the current behaviour rather than flagging it. The squash message for #10 still mentions "empty/suffix-only titles" even though the suffix-only case is not actually covered.
**Decision needed**
Either fix the normalization, or document this as acceptable behaviour. If we fix it, the test case should be restored.
Issues similaires
Tout voir
Python
Débutant
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 im…
Mise à jour
Python
Débutant
dash: a manual Refresh control
The dashboard polls: `refreshStats()` (`src/doberman/dash/app.py:408`) every 5 s and `refreshPending()` (`:54…
Mise à jour
Python
Débutant
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 r…
Mise à jour