feat: reorder tabs and persist active tab via URL hash#35
Merged
Conversation
Previously only a single page (~13β16 entries) was fetched, because the
JSON-XHR rewrite dropped the quantity control that the old HTML parser had
and never consumed pagination.hasMore.
Strava's /dashboard/feed endpoint uses cursor pagination (verified via HAR):
each entry carries cursorData.updated_at / rank; the next page is requested
with before=updated_at and cursor=int(rank) of the last entry. The loop runs
while hasMore is true, up to _FEED_MAX_PAGES=6 pages or 100 unique activities.
A short random pause (0.5β1.5 s, sleep/rng injectable for tests) is inserted
between page requests to keep load human-like.
Callers (engine.py, routes.py) and FeedParser.parse() are unchanged: the merged
result is returned as a single {"entries": [...], "pagination": {...}} dict.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
New tab order: Feed β Konfiguration β Automatik β Status & Log. Feed is now the default tab (was: Konfiguration). Adds URL-hash persistence: switching tabs writes location.hash=<tabName>; on load the hash is read back and the matching tab is activated (falls back to 'feed' for unknown/empty hashes). This means the browser stays on the same tab after a hard refresh and the active tab is also bookmarkable/shareable. The tab-switching logic is extracted into activateTab() so both click handlers and the initial restore call the same code path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
New order: Feed β Automatik β Konfiguration β Status & Log Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The separate Automation tab is removed. All settings (Scheduler, Dry-Run, Timing-Delays, Ruhezeiten) now live in the Configuration tab, separated by visual section dividers with category labels: β Zugangsdaten β Athleten β Kudo-Regeln β Automation The two forms (form-config / form-settings) and their save buttons are kept separate so each still calls its own API endpoint. Loading and saving logic in app.js is unchanged. A new .section-divider / .section-divider-label CSS component provides the horizontal-rule + uppercase label separators. The 'settings' hash is removed from validTabs; #settings in the URL now falls back to 'feed'. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The section divider label in the merged config tab referenced this key but it was not defined, causing the raw key to be shown as placeholder text. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
location.hash=<tabName>; on page load the hash is read back and the matching tab is restored (falls back tofeedfor empty/unknown hashes). The active tab survives a hard refresh and is also bookmarkable.Implementation
index.html: reordered<button>elements in<nav class="tabs">, movedactiveclass fromtab-configtotab-feedsectionapp.js: extractedactivateTab(tabName)helper that handles class toggling, hash writing, and feed/log side-effects;initTabs()wires click handlers and callsactivateTabonce on load with the hash-restored tab nameTest plan
#config)#configβ Configuration tab is restoredπ€ Generated with Claude Code