Skip to content

feat: Carbonara usability update - #99

Merged
summerofstart merged 11 commits into
developfrom
feature/carbonara
Aug 14, 2026
Merged

feat: Carbonara usability update#99
summerofstart merged 11 commits into
developfrom
feature/carbonara

Conversation

@Summer110622

@Summer110622 Summer110622 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Problem

pasta's core patching capabilities are present, but contributor guidance is implicit and the browser/CLI workflows expose avoidable friction.

Changes

  • add AGENTS.md with repository architecture, Java/Folia/ASM invariants, web privacy rules, and verification expectations
  • add CONTRIBUTING.md and .editorconfig
  • redesign the static browser flow with drag-and-drop, selected-file visibility, progress, reset controls, responsive/dark-mode handling, and stronger accessibility
  • keep browser patching local; no upload/telemetry path is introduced
  • add CLI --help, --output, --no-banner, -- handling, case-insensitive JAR checks, deterministic directory ordering, and already-patched filtering
  • update README with the Carbonara scope, browser workflow, CLI options, five-module layout, and current transformer chain
  • align CI with the actual Paper 1.21.x toolchain: Maven runs on JDK 21 while pasta-owned classes remain configured for --release 17
  • keep dependency review visible but non-blocking until the repository's GitHub Dependency graph is enabled

Compatibility

  • Maven build JDK is 21+ because Paper API 1.21.1 contains Java 21 class files
  • pasta's configured emitted bytecode target remains release 17; changing that target is a separate browser/runtime compatibility decision
  • project version remains 2.0.0; Carbonara is a development codename, not a release bump
  • existing java -jar ... <jar|directory> and no-argument interactive CLI workflows remain supported

Verification

Final CI run #39 completed successfully:

  • Java 21 Maven reactor verification: success
  • packaged artifact upload: success
  • dependency-review job: success (the review action itself remains advisory while GitHub Dependency graph is disabled)
  • CodeQL build and analysis: success

The earlier Java 17 lane exposed an existing toolchain mismatch: Paper API 1.21.1 classes are Java 21 bytecode. The workflow and contributor documentation now use JDK 21 for builds while preserving pasta's configured --release 17 output target.

Browser changes should also be manually exercised for picker/drop, skip, progress, download, and clear states before merge.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 62d07cab48

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +37 to +41
} catch (IllegalArgumentException error) {
System.err.println("Error: " + error.getMessage());
System.err.println();
printUsage();
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Return a failing status for argument errors

When automation invokes the CLI with an unknown option, multiple input paths, or a terminal --output, this catch prints an error but returns normally, so the JVM exits with status 0 even though no patching occurred. Shell scripts and CI can therefore treat a rejected invocation as successful; return a nonzero exit status for these errors while preserving status 0 for --help.

Useful? React with 👍 / 👎.

Comment on lines +98 to +102
if (!endOfOptions && ("-o".equals(argument) || "--output".equals(argument))) {
if (index + 1 >= args.length) {
throw new IllegalArgumentException(argument + " requires a directory path");
}
outputDir = Paths.get(args[++index]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject an option token as a missing output value

When --output is followed by another option, such as --output --help, the parser consumes --help as the directory and then enters interactive mode instead of reporting that the value is missing. Detect recognized option tokens in this position, with an explicit escape for output paths that genuinely begin with -, so value-bearing flags fail clearly as required.

AGENTS.md reference: AGENTS.md:L73-L76

Useful? React with 👍 / 👎.

Comment thread web/app.js
Comment on lines +49 to +53
dropZone.addEventListener("drop", event => {
event.preventDefault();
dropZone.classList.remove("is-dragging");
if (isBusy) return;
setSelectedFiles(Array.from(event.dataTransfer?.files ?? []));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Clear the native picker state after a drop

If a user first picks file A, then drops file B, the visible selection changes to B but the native input still contains A. Clicking Browse and selecting A again commonly emits no change event because the input's value did not change, leaving B displayed and causing B to be patched despite the user's latest choice; reset or synchronize fileInput when accepting dropped files.

Useful? React with 👍 / 👎.

@summerofstart
summerofstart merged commit 227b5eb into develop Aug 14, 2026
4 checks passed
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.

2 participants