Skip to content

enhancement(RecentChangesActivity): modernize recent changes activity - #327

Open
dbhavsar76 wants to merge 9 commits into
researchxxl:mainfrom
dbhavsar76:recent-changes-activity
Open

enhancement(RecentChangesActivity): modernize recent changes activity#327
dbhavsar76 wants to merge 9 commits into
researchxxl:mainfrom
dbhavsar76:recent-changes-activity

Conversation

@dbhavsar76

@dbhavsar76 dbhavsar76 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Description

Update the recent changes activity to kotlin, compose and material design. Add compose preview for checking ui without the test data.

Changes

  • Add new recent changes activity and components
  • Remove old code and now unused resources
  • Added compose ui tooling for previewing composables and variants
  • Improvements over old activity
    • Update the long polling api call to timeout in 1 sec and 5 second polling
    • update the change time from timestamp to relative time
    • given option to see the timestamp as well.
    • Added pull to refresh

Screenshots

Before

recent-changes-before-test-data

After

recent-changes-after-test-data-light recent-changes-after-test-data-dark recent-changes-after-test-data-exact-time-long-names image

@dbhavsar76
dbhavsar76 temporarily deployed to dev-sign-untrusted July 27, 2026 18:22 — with GitHub Actions Inactive
@dbhavsar76
dbhavsar76 temporarily deployed to dev-sign-untrusted July 27, 2026 18:27 — with GitHub Actions Inactive
@researchxxl

Copy link
Copy Markdown
Owner

thanks.. pls allow me some time to review =)

@researchxxl

Copy link
Copy Markdown
Owner

@dbhavsar76 btw kindly asking if you could later have a look at #303 again?? a small improvement to expired certs would be welcomed from my side should not be much to do for this expert option ;))

@dbhavsar76
dbhavsar76 temporarily deployed to dev-sign-untrusted July 28, 2026 05:13 — with GitHub Actions Inactive

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the “Recent changes” feature by replacing the legacy view-based Java Activity/RecyclerView implementation with a Kotlin + Jetpack Compose + Material 3 screen, including debug-only Compose previews for UI review without needing live Syncthing data.

Changes:

  • Replaced the old RecentChangesActivity + RecyclerView adapter/layout/menu with a new Compose-driven RecentChangesActivity/RecentChangesScreen.
  • Updated disk-event fetching behavior to avoid long-poll UI hangs by adding timeout=1 to the /rest/events/disk request.
  • Added debug-only Compose preview tooling dependencies and a comprehensive preview suite.

Reviewed changes

Copilot reviewed 16 out of 51 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
gradle/libs.versions.toml Adds Compose UI tooling + preview artifacts, pinned to the Compose UI version.
app/src/main/res/values/strings.xml Adds new strings used by the Compose overflow menu and accessibility labels.
app/src/main/res/menu/recent_changes_list.xml Removes legacy refresh action menu resource (no longer used by Compose UI).
app/src/main/res/layout/item_recent_change.xml Removes legacy RecyclerView row layout (replaced by Compose ListItem).
app/src/main/res/layout/activity_recent_changes.xml Removes legacy Activity layout (replaced by setContent {} Compose root).
app/src/main/java/com/nutomic/syncthingandroid/views/ChangeListAdapter.java Removes legacy RecyclerView adapter for recent changes.
app/src/main/java/com/nutomic/syncthingandroid/service/RestApi.java Adjusts disk-event request parameters to avoid long-poll hangs; updates documentation.
app/src/main/java/com/nutomic/syncthingandroid/service/Constants.java Adds a preference key for the “show exact times” UI option.
app/src/main/java/com/nutomic/syncthingandroid/recentchanges/RecentChangesScreen.kt New Compose UI implementation (screen + rows + overflow menu + pull-to-refresh).
app/src/main/java/com/nutomic/syncthingandroid/recentchanges/RecentChangesActivity.kt New Kotlin Activity: foreground polling, preference wiring, and disk-event mapping/filtering.
app/src/main/java/com/nutomic/syncthingandroid/fragments/DrawerFragment.kt Updates navigation import/intent target to the new RecentChangesActivity package.
app/src/main/java/com/nutomic/syncthingandroid/DaggerComponent.java Removes injection entry for the deleted legacy RecentChangesActivity.
app/src/main/java/com/nutomic/syncthingandroid/activities/RecentChangesActivity.java Removes the legacy Java implementation of Recent Changes.
app/src/main/AndroidManifest.xml Updates the manifest activity class name to the new package location.
app/src/debug/java/com/nutomic/syncthingandroid/recentchanges/RecentChangesPreviews.kt Adds debug-only Compose previews with sample data for fast UI iteration/review.
app/build.gradle.kts Adds debug-only Compose preview tooling dependencies.

Comment on lines 1016 to +1030
/**
* Requests and parses information about recent changes.
*/
/**
* Fetches the most recent disk events.
*
* "timeout=1" is important. /rest/events/disk is a long-poll endpoint: when no disk events are
* buffered it blocks for the server default of 60s before returning an empty array, which made
* the Recent changes screen appear to hang on open. The web GUI gets away without this because it
* only ever calls the endpoint in the background and renders cached results, never blocking the
* user. We fetch on screen open, so we want a query rather than a subscription.
*
* As a bonus this keeps each request well inside Volley's 5s socket timeout, so it is no longer
* retried 5 times per call (see the "should not be retried" note in the server's getEvents).
*/
Comment thread app/src/main/res/values/strings.xml Outdated
researchxxl and others added 3 commits August 4, 2026 09:25
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Jonas <244199422+researchxxl@users.noreply.github.com>
@researchxxl
researchxxl temporarily deployed to dev-sign-untrusted August 4, 2026 07:31 — with GitHub Actions Inactive
@researchxxl
researchxxl temporarily deployed to dev-sign-untrusted August 6, 2026 07:56 — with GitHub Actions Inactive
@dbhavsar76
dbhavsar76 deployed to dev-sign-untrusted August 15, 2026 17:23 — with GitHub Actions Active
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.

3 participants