Repository navigation
K2GO-422 feat(forgejo): non-destructive live repo refresh + "Update repos" action - #595
Merged
Merged
Conversation
…ash-node 1.3.7) Add refresh_forgejo to the shared orchestration: per repo fast-forward when pristine, a clean 3-way merge (git merge-tree, no worktree) when the owner committed on the served branch, skip on conflict. The served branch only moves forward (every advance is a fast-forward push THROUGH forgejo so its hooks fire), so a refresh never drops a commit. Deepen-on-demand avoids a false 'blocked' when a repo fell more than the shallow depth behind. Each repo's description is rewritten as a human status board (Last Update / Last Attempt / Status), derived from git state. New POST /forgejo/refresh, GET /forgejo/refresh/status (with changed/problems/total), POST /forgejo/refresh/cancel (SIGKILL the wrapper process group), via tools/forgejo-refresh.sh. Seed clone depth 1 -> 20. dash-node 1.3.6 -> 1.3.7.
…tion sheet One shared flow (ForgejoRepoRefresh) drives the box refresh from two entry points: the module detail button and the module action sheet row (Material ic_refresh). Shown only when the forge is manageable and the example repos are present (ForgejoStatusClient.canUpdateRepos()); a forge with an admin K2Go cannot authenticate stays blocked. Gates like the dashboard update (internet + metered consent). Minimal inline progress (description + live output tail + indeterminate bar + Cancel); the trigger stays in place (disabled) as an anchor. Result snackbar covers every state: updated / already up to date / some could not be updated / could not update any / cancelled. No persistent app-side state (the box job is detached). ForgejoSeedClient gains refresh()/cancelRefresh() and the outcome counts, reusing the seed poll.
Migrate the nine k2go_forgejo_update_* strings out of the WIP tracker into strings.xml with values for all 33 locales (machine-generated, flagged for human review).
The hero ImageView used android:tint, which lint flags as an error (UseAppTint, not in the baseline) and fails lintStandardDebug on main. Switch to app:tint (AppCompat auto-inflates ImageView to AppCompatImageView) and declare xmlns:app. Visually identical.
luisguzman-adfa
deleted the
feat/K2GO-422-forgejo-repos-post-install
branch
September 26, 2026 00:32
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.
Section A of K2GO-422: keep the seeded Forgejo example repos fresh, non-destructively, from the app.
What this changes
3-way merge (git merge-tree, no worktree) when the owner committed on the served branch, skip on
conflict; deepen-on-demand avoids a false "blocked" when a repo fell past the shallow depth. Every
advance is a fast-forward push through Forgejo, so a refresh never drops a commit. Each repo
description is rewritten as a status board (Last Update / Last Attempt / Status). New
POST /forgejo/refresh, GET /forgejo/refresh/status, POST /forgejo/refresh/cancel via
tools/forgejo-refresh.sh. Seed clone depth 1 -> 20. dash-node 1.3.6 -> 1.3.7.
the module action sheet row, shown only when the forge is manageable and the repos are present.
Gated like the dashboard update (internet + metered). Inline progress + Cancel; outcome snackbar
covers every state.
Verification
reviewed but not device-exercised (no divergent repo to stage without a proot session). Minor deferred:
counts parsed from the box log; offline writes "updatable"; bounded Activity-retention on a hung
fetch; no guard vs a concurrent dashboard rebuild.
Follow-up: K2GO-430 (require a minimum dash-node version per module).