Skip to content

feat(launcher): browse CurseForge by section, import any package, and quieten the mod menu button - #191

Closed
Lynxifyy wants to merge 5 commits into
mainfrom
fix/launcher-browse-import-settings
Closed

Lynxifyy wants to merge 5 commits into
mainfrom
fix/launcher-browse-import-settings

Conversation

@Lynxifyy

Copy link
Copy Markdown
Collaborator

Three launcher fixes from the reported list. Each one has a JVM test; none of them could be checked on a phone from here (no device, and assembleDebug needs the Rust toolchain, which this container does not have).

CurseForge tab was blank until you searched

  • The screen only called the API from the Search button, so a first visit showed an empty page. It now runs the default listing on entry, guarded so a recomposition cannot re-fire it.
  • Section chips are the API's own Minecraft Bedrock classes, read from the live catalogue (GET /v1/categories?gameId=78022): All, Add-ons (4984), Texture packs (6929), Scripts (6940), Maps (6913), Skins (6925).
  • Everything asks for total downloads descending (sortField=6) and the page is re-sorted on the client, so a row cannot read out of order.
  • The row drew a hardcoded CurseForge mark in place of the project's picture, which made every texture pack look identical. It now draws logo.thumbnailUrl through the existing bounded avatar cache and keeps the mark only as the fallback.
  • CurseForgeClient.searchUrl was extracted so the query shape is testable: an empty query sends no searchFilter, All sends no classId.

Import instance said "zip" and did not import

  • The subtitle promised a .zip while the importer rejected anything that was not .apk/.xapk. A real XAPK unpacks its APKs at the root and its OBB under Android/obb/, but the installer only reads apk/ and obb/ — so an imported XAPK produced an empty instance that appeared in the list and refused to launch.
  • New ImportedPackageLayout collects every APK/OBB/manifest wherever the archive put it (four levels deep), makes the largest APK base.apk, keeps the splits, and is idempotent. Detection is by name and zip signature, so a package renamed by a file provider still opens.
  • New ArchiveExtractor (split out of VersionManager, which is at its file-size baseline) skips zip entries that resolve outside the scratch directory — the old code joined the entry name and wrote it.
  • Import now has a progress dialog: a ring plus the percentage in Press Start 2P. Progress used to go to busyMessage, which only the sign-in dialog reads, so a minute-long import looked frozen.

In-game Mod Menu button

  • It wore the client's apple, which named the client in every screenshot it appeared in. It now draws a three-bar handle. ModMenuButtonIconTest pins the choice plus the properties the glyph needs on any game scene.

Tests

:app:testDebugUnitTest — 3447 tests, 0 failures, 1 skipped. New: CurseForgeSectionsTest (5), ImportedPackageLayoutTest (7, against real temp directories), ModMenuButtonIconTest (3). Gates that failed on the way and were fixed properly: FileSizeBudgetTest (split, not raised) and Api28CompatTest (Stream.toList).

Docs: new docs/agents/caramel-curseforge-tab.md, plus bullets in installations-tab-pluggable-package-sources.md.

Still needs a phone: the thumbnails actually painting, the import dialog on a real package, and the handle's contrast over a bright scene.

@Lynxifyy can click here to continue refining the PR

The tab did nothing until a query was typed: nothing called the API on entry. It now browses
on first visit, and the section chips are the API's own Minecraft Bedrock classes (Addons
4984, Texture Packs 6929, Scripts 6940, Maps 6913, Skins 6925, read from
/v1/categories?gameId=78022) instead of an unfiltered mixture. Every section asks for total
downloads descending and the list is re-sorted on the client, so a row cannot read out of
order.

The result row drew a hardcoded CurseForge mark in place of the project's picture, which made
every texture pack look identical. It draws logo.thumbnailUrl through the existing avatar cache
and keeps the mark only as the fallback.
…gress

The importer only worked for a bare .apk. An .xapk unpacks its APKs at the root and its OBB
under Android/obb/, but the installer only reads apk/ and obb/, so an XAPK produced an empty
instance that appeared in the list and refused to launch. ImportedPackageLayout now collects
the parts wherever the archive put them, makes the largest APK base.apk and keeps the splits,
so both layouts install. A .zip is accepted too, and the picker's own subtitle stops
promising a zip the importer used to reject.

Archive entries that point outside the import directory (../, an absolute path, a Windows
separator) are skipped instead of being written, which was an arbitrary-write path.

Importing now shows a modal progress ring with the percentage in the pixel face. It was
writing to busyMessage, which only the sign-in dialog reads, so the import looked frozen.
… brand mark

The floating button wore the Caramel apple, so it named the client in every screenshot it
appeared in. It now draws a three-bar handle: still obviously a menu, no longer a logo.
ModMenuButtonIconTest pins the choice and the properties the glyph needs to stay legible on
any game scene (a vector, visible strokes, one flat white).
…b at API 28

VersionManager crossed its file-size baseline once import grew, so the archive unpacking moved
to ArchiveExtractor; the tab used Stream.toList, which the API-28 gate rejects.
…mport layout

Both bugs came from a contract nobody had written down: the CurseForge tab only searched on
demand, and the importer assumed every package already had the installer's layout.
@Lynxifyy Lynxifyy closed this Nov 28, 2026
@Lynxifyy
Lynxifyy deleted the fix/launcher-browse-import-settings branch November 28, 2026 06:33

This branch was previously deployed

1 inactive deployment
github-pages — fa51f485 Deployed Nov 28, 2026 by Lynxifyy via deploy #45
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.

1 participant