From cef6aa7be44de9aad0d0bd3f2fba9d9590fafeb8 Mon Sep 17 00:00:00 2001 From: Daniel McCoy Stephenson Date: Fri, 13 Nov 2026 21:27:01 -0700 Subject: [PATCH] Describe the web interface in the user guide The guide only said to open http://localhost:8080. It now describes the backup form (one name per submission, server message shown on success or failure) and the status section (totals, refresh, remembered list, card and gallery views), as implemented in static/app.js and index.html. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 1 + USER_GUIDE.md | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be0fc5f..0ad152e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed +- Documentation accuracy: `USER_GUIDE.md` now describes the web interface served in web mode — the backup form, which takes one user or organization per submission and shows the server's success or error message, and the status section with its totals, refresh button and remembered list, card and gallery views — where it previously only said to open `http://localhost:8080` - `POST /api/backups` now answers a backup that fails with an unchecked exception (such as a `GHException` from github-api while listing repositories) with `500 Internal Server Error` and `{ "success": false, "message": "Error: ..." }`, as `COMMANDS.md` documents, instead of Spring Boot's default error body, which has no `message`, so the web UI showed only `Failed to create backup.`. No `backup-completed` event is reported for it. Previously only an `IOException` was handled this way; the command line and daemon already handled both - The interactive `backup` command now backs up each name it is given, so `backup octocat github` backs up `octocat` and then `github`, as the command line does, instead of looking up the single name `octocat github` on GitHub and failing. A name that fails is reported and the others are still backed up; the command still counts as one backup run for usage reporting, and its usage hint reads `Usage: backup [user/org2] ...` - Interactive mode's command list, printed on start and by `help`, now shows `backup [user/org2] ...` instead of `backup `, so it no longer suggests that `backup` takes a single name diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 7c83544..a505ec1 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -29,7 +29,7 @@ Start the web server: java -Dspring.profiles.active=web -jar target/gh-backup-2.0.0-SNAPSHOT-8-8-2026.jar ``` -Open `http://localhost:8080` in your browser to use the web interface. +Open `http://localhost:8080` in your browser to use the web interface; see [Using the web interface](#using-the-web-interface) for what it offers. ### Quick Start – Daemon Mode @@ -141,6 +141,13 @@ Total: 1 users/organizations, 8 repositories Exiting interactive mode... ``` +### Using the web interface + +In web mode, the page at `http://localhost:8080` (or the port set with `-Dserver.port`) has two sections, both backed by the [Web API](COMMANDS.md#web-api-endpoints): + +- **Create New Backup** — enter one GitHub user or organization and select **Start Backup**. The button shows a spinner and stays disabled until the backup finishes, which can take a while for a large account, or up to an hour if the GitHub rate limit is reached (see [Rate Limits](#rate-limits)). The result appears below the form: on success, the server's message (for example, `Backup completed successfully for octocat`), after which the field is cleared and the status reloads; on failure, the server's error message, such as `Invalid GitHub username format` or the names of repositories that failed. To back up several accounts, submit them one at a time. +- **Backup Status** — loaded when the page opens and again with the **Refresh** button. It shows the total number of users/organizations and repositories, followed by every backed-up repository with its last-updated time, the same information as the interactive `status` command. Three buttons switch between a list view, a card view, and a gallery view that shows every repository as a card colored by its user or organization, with a color key. The chosen view is remembered by the browser for the next visit. When nothing has been backed up yet, the section says so; when the status cannot be loaded, it shows `Failed to load status. Please check if the server is running.` + ## Output Structure Repositories are organized by user or organization inside the backup directory: