Skip to content

Align Home shelves with server settings and reading activity - #282

Merged
van-geaux merged 2 commits into
van-geaux:mainfrom
JBWortley:contrib/273-home-shelves
Oct 18, 2026
Merged

van-geaux merged 2 commits into
van-geaux:mainfrom
JBWortley:contrib/273-home-shelves

Conversation

@JBWortley

Copy link
Copy Markdown
Contributor

Closes #273.

This fixes the Home shelf problems from the issue:

  • Currently Reading uses the latest reading activity.
  • On Deck follows the synchronized BookOrbit setting.
  • Recently Updated Series keeps entries from every library in See all.
  • Recently Added Series uses collection activity instead of file timestamps.

I added regression coverage for ordering, BookOrbit preference parsing, provider behavior, and the cross-library See all path.

Tested against current main with the JVM suite, Android compilation, lint, and a debug APK.

@van-geaux

Copy link
Copy Markdown
Owner

Thanks for taking this on. The scope is well focused, and the changes address the Home shelf inconsistencies in a thoughtful way. I especially appreciate the regression coverage around ordering, BookOrbit preference parsing, provider behavior, and the cross-library Recently Updated Series path. The provider-specific handling also fits the current module boundaries well.

I found one small state-management issue worth addressing:

app/src/main/java/com/vangeaux/lagrange/BookOrbitHomeScreen.kt:6182 remembers sectionBooks using only books and section, but the initial localSectionBooks calculation now also depends on state.homeShelfPreferences.onDeckEnabled and state.homeShelves.isServerProvided.

If a user opens the On Deck “See all” screen before the asynchronous BookOrbit preference request completes, the screen may retain the initial empty list even after On Deck becomes enabled. Could the preference/server-shelf values be included in the remember keys, or could the state be keyed from localSectionBooks, while preserving the intended pagination reset behavior?

Other than that, I found no blocking correctness concerns. The overall direction and test coverage look good.

@JBWortley

Copy link
Copy Markdown
Contributor Author

Good catch, thanks. I changed the remembered section list to follow the derived local section books, so an open On Deck screen now updates when either the preference or server-shelf state arrives. I also added a Compose regression for both cases while leaving the pagination reset keys as they were.

@van-geaux

Copy link
Copy Markdown
Owner

Thanks for the focused fix. The Home shelf behavior and regression coverage look good, and the latest follow-up correctly handles delayed On Deck preference updates. The PR is ready to merge after one small hygiene fix.

git diff --check origin/main...HEAD currently reports trailing-whitespace errors on the newly added lines. Please clean up the affected files without reformatting unrelated code, then rerun:

git diff --check origin/main...HEAD

Please push the cleanup once that command returns no errors. After the updated head and CI are confirmed, this is ready to merge.

@JBWortley

Copy link
Copy Markdown
Contributor Author

I checked this again at the current head and git diff --check origin/main...HEAD is clean here. I also checked the GitHub diff and couldn’t find any added lines with trailing whitespace. Could you point me to the files or lines you’re seeing?

@van-geaux

Copy link
Copy Markdown
Owner

Thanks for the focused implementation and the follow-up fix for delayed On Deck preference updates.

My previous comment was only regarding the CRLF/diff hygiene issue, not a functional concern. I’ve tried the APK build for a couple of days, and the Home shelf behavior works great:

  • Currently Reading follows the latest reading activity.
  • On Deck respects the synchronized BookOrbit setting.
  • Recently Updated Series retains entries from all accessible libraries in See all.
  • Recently Added Series uses collection order rather than file timestamps.

The regression coverage and GitHub checks also pass. I’m happy with the behavior, so we will merge this PR.

@van-geaux
van-geaux merged commit 852f26f into van-geaux:main Oct 18, 2026
1 check passed
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.

Align Home shelves with server settings and reading activity

2 participants