Skip to content

Small truths: settings, tool output, worlds and search owners - #144

Open
Pelotrio wants to merge 2 commits into
1.21.1from
claude/small-truths
Open

Pelotrio wants to merge 2 commits into
1.21.1from
claude/small-truths

Conversation

@Pelotrio

@Pelotrio Pelotrio commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Second PR of the follow-ups plan (docs/FOLLOW_UPS.md, local on 1.21.1): items 4-9, from #56 and #58.

What was wrong, and what changes

  • 4. A setting no specification describes got Restart.NONE, so its save said the game reloaded it. ConfigSetting.undescribed now makes such settings in one place with Restart.UNKNOWN, which only Companion makes. While the game runs, a save of one says "the catalog does not describe when the game uses it" (Effect.UNDESCRIBED, not pending). A revert's result stays empty on success.
  • 5. A tool's failure or output beyond 256 characters was clipped for display, and the whole text could not be had. FactsPanel.Part keeps the whole text of a tool's status and output, and those rows get a copy button beside the value (CopyValue, which can now sit beside a component its owner keeps up to date). The problem row keeps its error icon and color, and the button is reachable by keyboard. Which rows have a button follows their kind and label, so an update in place keeps the layout; a change there rebuilds the section.
  • 6. A numeric bound equal to Integer.MAX_VALUE read as no bound in the refusal, so a long ranged to it refused a larger value with "Accepts any". The refusal now names the bound it crossed ("Accepts at most 2147483647").
  • 7. A failure while listing worlds read as "no world has the file", and one world's failure dropped the worlds after it. ConfigSources.of returns Listed: the copies found, plus the worlds or the saves folder that could not be read. A missing saves folder is still no world. The Configuration page shows the reason beside what it listed and beside what an edit says, in place of "No world has created this file yet", and the pack's Configuration page adds it to its problems.
  • 8. Search Everywhere's module filter took a resource's owner from its namespace, so a mod's resources under another namespace (assets/c/...) were filtered out. The owner now comes from the file that holds the resource, through CatalogIndex.resourceFiles, mapped when the listing is built. A shared archive keeps all its mods, Minecraft keeps its own assets, and the shown owner prefers the mod named by the namespace.
  • 9. An empty value with a non-empty default was not shown as modified; the table now asks whether the file sets the value, not whether its text is empty.

Tests

  • ConfigChangesTest: an undescribed setting applies when the game starts, and while it runs it is UNDESCRIBED and not pending.
  • FactsPanelTest: the copy buttons give the whole status and output, and the new whole text after an update in place; a row without whole text has none.
  • ConfigEditTest: a value past an int's limit names the bound.
  • ConfigPanelTest: no saves folder lists the defaults without a problem; a saves that cannot be listed names it and still lists the defaults; the page shows that warning beside a refused edit's reason; an empty value the file sets is modified.
  • CatalogSearchTest: a resource under another namespace is found by its mod's module, not by another.

:storage:test and Companion's configuration, inspection and search tests pass locally.

🤖 Generated with Claude Code

… and search owners

- A setting no specification describes has Restart.UNKNOWN (ConfigSetting.undescribed, one place); while the game runs,
  its save says the catalog does not describe when the game uses it, instead of that the game reloaded it.
- A tool's status and output beyond 256 characters keep their whole text; a copy button beside the row copies it,
  also after an update in place.
- A refused number names the bound it crossed, also a bound at an int's limit, which the table reads as none.
- A world that cannot be listed is named, the others and the defaults are still listed, and the Configuration page
  shows that beside what an edit says. A missing saves folder is still no world.
- Search Everywhere's module filter takes a resource's owner from the file that holds it, not its namespace.
- An empty value the file sets counts as changed from a non-empty default.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T23:04:08.862036Z d2e8b28 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 2ce6b4a0cd

ℹ️ 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 89 to 90
return this.setting != null && this.literal != null && !this.setting.defaultValue().isEmpty()
&& !this.value.equals(this.setting.defaultValue());

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 Preserve modified state when literals are unavailable

When NightConfig can read a configuration that TomlText cannot edit, ConfigValues.parse deliberately preserves the parsed values while leaving literals empty. Every row then has its actual value but a null literal, so this new guard marks even a non-default value as unmodified and hides its change marker and its row under the Modified filter. Track whether the parsed values contain the setting separately from whether an editable literal was found.

AGENTS.md reference: AGENTS.md:L13-L13

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in d2e8b28: a literal tells that the file sets a value, even an empty one; without literals (unset, or a file TomlText cannot edit) a non-empty value still counts, as before. Tested with a row that has a value but no literal.

Comment on lines +425 to +426
String own = this.problem.isEmpty() ? this.status : this.problem;
String text = this.unlisted.isEmpty() ? own : own.isEmpty() ? this.unlisted : this.unlisted + "; " + own;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add a render scenario for the unread-world notice

This introduces a new configuration-page failure state, including the combined unlisted; edit problem layout, but the commit adds no UiRenderScenario or driver setup that displays it. The UI guide requires every new page or state to be rendered in both themes, so add a scenario that makes saves unreadable and exercises this notice composition.

AGENTS.md reference: AGENTS.md:L13-L13

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added in d2e8b28: configuration-unlisted puts a file where the saves folder belongs and opens the test mod's new server configuration, whose defaults copy is shown under the notice. The harness catalog gains that server configuration and a world copy.

Comment on lines +470 to +471
CopyValue copy = new CopyValue("Copy Value", value);
copy.setValue(whole);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add a render scenario for copied tool output

The copy button beside clipped inspection-tool status/output is a new UI state, but the commit does not add or update a UiRenderScenario to show it; the existing inspection scenario only presents the ordinary sample read. Add a scenario with long tool output or failure so the required light- and dark-theme render checks cover this row layout and control.

AGENTS.md reference: AGENTS.md:L13-L13

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added in d2e8b28: inspection-tool-output shows a tool whose failure and output are too long to show whole, each row with its copy button. Tool runs need the game, so the scenario tells the session the finished run through finishTool, as script-problems does with showRunResult.

…scenarios for an unread saves folder and long tool output

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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