feat(home): the News panel lists the website's posts, each opening in the browser #429

Merged
HumanBean merged 1 commit from HumanBean/LongshotLauncher:feat/website-news into main 2026-12-06 03:48:19 +00:00
Owner

Summary

The Home page's News panel only ever showed a fixed welcome. It now lists the website's News posts
(Longshot #3306 adds them, and /news.json):

  • At start the launcher fetches https://longshot.magicbean.dev/news.json once, in the background, through the same
    HTTPS client as its other downloads (1 MiB at most). It lists up to 20 posts, newest first: the day, the title and the
    summary.
  • A click, or Return on a focused post, opens the post's page in the browser. Only pages on longshot.magicbean.dev open.
  • Until the list arrives, or when it cannot be fetched, the welcome text stays, as before. A failure is a line on
    stderr, never a notice.
  • All posts ↗ opens the website's News page instead of the forge's releases.

Read first: src/shell.rs (load_news, news_posts), then NewsItem in ui/home.slint and NewsPost in
ui/shell-model.slint.

Testing

Tested: Linux. cargo test passes (429, among them two new ones for reading the list: the website's pages kept in
order, anything else left out, and a page that isn't JSON refused), and cargo clippy --all-targets -- -D warnings is
clean.

Still to test:

  • Once Longshot #3306 has deployed /news.json: start the launcher, see the 4.0 post in News, click it and it opens in
    the browser (by hand).
  • Offline: the welcome stays, nothing else changes (by hand).

Risks

One small request at start to the website. If it fails, the panel looks as it does today. A revert is enough.

🤖 Generated with Claude Code

## Summary The Home page's News panel only ever showed a fixed welcome. It now lists the website's News posts ([Longshot #3306](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/3306) adds them, and `/news.json`): - At start the launcher fetches `https://longshot.magicbean.dev/news.json` once, in the background, through the same HTTPS client as its other downloads (1 MiB at most). It lists up to 20 posts, newest first: the day, the title and the summary. - A click, or Return on a focused post, opens the post's page in the browser. Only pages on longshot.magicbean.dev open. - Until the list arrives, or when it cannot be fetched, the welcome text stays, as before. A failure is a line on stderr, never a notice. - **All posts ↗** opens the website's News page instead of the forge's releases. Read first: `src/shell.rs` (`load_news`, `news_posts`), then `NewsItem` in `ui/home.slint` and `NewsPost` in `ui/shell-model.slint`. ## Testing **Tested:** Linux. `cargo test` passes (429, among them two new ones for reading the list: the website's pages kept in order, anything else left out, and a page that isn't JSON refused), and `cargo clippy --all-targets -- -D warnings` is clean. **Still to test:** - Once Longshot #3306 has deployed `/news.json`: start the launcher, see the 4.0 post in News, click it and it opens in the browser (by hand). - Offline: the welcome stays, nothing else changes (by hand). ## Risks One small request at start to the website. If it fails, the panel looks as it does today. A revert is enough. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(home): the News panel lists the website's posts, each opening in the browser
Some checks are pending
CI / What the change needs (pull_request) Waiting to run
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Waiting to run
CI / Rust formatting, lint and tests (pull_request) Blocked by required conditions
CI / Release packages and stable upgrades (pull_request) Blocked by required conditions
PR title / Conventional Commit title (pull_request) Waiting to run
2063e26b92
The panel fetches longshot.magicbean.dev/news.json once, in the
background, and lists its posts newest first: day, title and summary.
A click or Return opens the post's page; only the website's pages open.
Until the list arrives, or when it cannot, the welcome stays. All posts
opens the website's News page instead of the forge's releases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member

Possibly related, for context:

  • PR MagicBeanDev/Longshot#3306 feat(website): a News section, with the Longshot 4.0 announcement — Merged PR adds the /news.json feed this consumes
Possibly related, for context: - PR MagicBeanDev/Longshot#3306 feat(website): a News section, with the Longshot 4.0 announcement — Merged PR adds the /news.json feed this consumes
HumanBean changed title from WIP: feat(home): the News panel lists the website's posts, each opening in the browser to feat(home): the News panel lists the website's posts, each opening in the browser 2026-12-06 03:28:44 +00:00
BeanBot left a comment

Recommendation: Approve. The panel’s behavior against the website’s actual feed has not yet been demonstrated. It needs the companion feed deployed and a visual and interaction check before merge. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

The launcher fetches website news in the background and shows linked posts on Home, keeping the welcome when no posts are available. The implementation is small and reuses the existing HTTPS client; it adds one request per launch.

Should fix (1): not blocking, but worth doing before merging.

  • L2: The pull request does not include the screenshot required for an on-screen change. When: Reviewers cannot see the new News panel in the pull request. Do: Add a screenshot of the populated panel to the pull request description.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L1 ui/home.slint:544: The new panel has not yet been checked with the website’s actual feed or shown on screen. (more on the line) Do: After Longshot #3306 deploys the feed, check the list, opening a post, keyboard navigation and the offline welcome, and attach a screenshot.

@fix can do L2.

Questions (1) (not confirmed from the code; they don't hold the recommendation)

  • When keyboard focus moves to a post below the visible portion of the feed, does the scroll view bring that post into view?

Checks: Still running: 5 checks.

More: does it help, other systems, switches, what was read

Does it help: Unproven: the parser tests use synthetic JSON, and the described manual check against the deployed feed has not yet been done. This is not a performance change.

Other systems: The change affects the Home panel on Windows and Linux, including its narrow layout and keyboard and controller navigation. It uses the shared HTTPS client and posts the result to the UI event loop; the actual feed and on-screen interaction remain unverified.

Switches: None.

Reviewed: 2063e26b92 against 08fa1329e5: Read AGENTS.md, CONTRIBUTING.md, the commit and diff, src/shell.rs, ui/home.slint, ui/shell-model.slint and the relevant parts of ui/main.slint, the shared scroll view, Pressable, startup, controller navigation and HTTP client. Skimmed the remaining ui/main.slint and related documentation. No review checklist or pull request template was present.; nothing run (a code review).

Checked and fine:

  • The response body is capped at 1 MiB before parsing.
  • The worker publishes the model through the UI event loop and handles a closed window with a weak reference.
  • The commit has an AI co-author trailer, and no game-derived files are included.
  • The URL is checked both when parsing and before opening.

Testing: No commands that build or run the project were executed. The author reports Linux cargo tests and Clippy passing; the listed CI checks are still running.

Overlaps and merge order: Longshot #3306 supplies the feed and News page; deploy it before the end-to-end check.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as HumanBean took it out of WIP. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The panel’s behavior against the website’s actual feed has not yet been demonstrated. It needs the companion feed deployed and a visual and interaction check before merge. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. The launcher fetches website news in the background and shows linked posts on Home, keeping the welcome when no posts are available. The implementation is small and reuses the existing HTTPS client; it adds one request per launch. **Should fix (1)**: not blocking, but worth doing before merging. - **L2**: The pull request does not include the screenshot required for an on-screen change. *When:* Reviewers cannot see the new News panel in the pull request. **Do:** Add a screenshot of the populated panel to the pull request description. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L1** `ui/home.slint:544`: The new panel has not yet been checked with the website’s actual feed or shown on screen. (more on the line) **Do:** After Longshot #3306 deploys the feed, check the list, opening a post, keyboard navigation and the offline welcome, and attach a screenshot. `@fix` can do L2. **Questions (1)** (not confirmed from the code; they don't hold the recommendation) - When keyboard focus moves to a post below the visible portion of the feed, does the scroll view bring that post into view? **Checks:** Still running: 5 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: the parser tests use synthetic JSON, and the described manual check against the deployed feed has not yet been done. This is not a performance change. **Other systems:** The change affects the Home panel on Windows and Linux, including its narrow layout and keyboard and controller navigation. It uses the shared HTTPS client and posts the result to the UI event loop; the actual feed and on-screen interaction remain unverified. **Switches:** None. **Reviewed:** 2063e26b920e against 08fa1329e595: Read AGENTS.md, CONTRIBUTING.md, the commit and diff, src/shell.rs, ui/home.slint, ui/shell-model.slint and the relevant parts of ui/main.slint, the shared scroll view, Pressable, startup, controller navigation and HTTP client. Skimmed the remaining ui/main.slint and related documentation. No review checklist or pull request template was present.; nothing run (a code review). **Checked and fine:** - The response body is capped at 1 MiB before parsing. - The worker publishes the model through the UI event loop and handles a closed window with a weak reference. - The commit has an AI co-author trailer, and no game-derived files are included. - The URL is checked both when parsing and before opening. **Testing:** No commands that build or run the project were executed. The author reports Linux cargo tests and Clippy passing; the listed CI checks are still running. **Overlaps and merge order:** Longshot #3306 supplies the feed and News page; deploy it before the end-to-end check. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as HumanBean took it out of WIP. Nothing was run; a maintainer decides.</sub>
@ -504,2 +543,2 @@
spacing: 20px;
VerticalLayout {
spacing: 12px;
for post in Shell.news: NewsItem { post: post; }
Member

L1 (should fix): The new panel has not yet been checked with the website’s actual feed or shown on screen.

When: The current tests only parse synthetic data; they do not show that the deployed feed renders correctly or that a displayed post opens from the panel.

Do: After Longshot #3306 deploys the feed, check the list, opening a post, keyboard navigation and the offline welcome, and attach a screenshot.

**L1** (should fix): The new panel has not yet been checked with the website’s actual feed or shown on screen. *When:* The current tests only parse synthetic data; they do not show that the deployed feed renders correctly or that a displayed post opens from the panel. **Do:** After Longshot #3306 deploys the feed, check the list, opening a post, keyboard navigation and the offline welcome, and attach a screenshot.
Author
Owner

The News panel on Linux (sway), with this branch reading the website's news.json as built by Longshot #3306 (read from the build on disk for this picture, since the site hadn't deployed it yet). The post opens in the browser on a click.

News panel with the Longshot 4.0 post

The News panel on Linux (sway), with this branch reading the website's `news.json` as built by Longshot #3306 (read from the build on disk for this picture, since the site hadn't deployed it yet). The post opens in the browser on a click. ![News panel with the Longshot 4.0 post](https://git.magicbean.dev/attachments/fcb871bb-f7c5-4f22-a610-dfe68cce414c)
HumanBean deleted branch feat/website-news 2026-12-06 03:48:20 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!429
No description provided.