Repository navigation
Conversation
The Advanced settings page gets an "Experiments (unsupported)" card with one checkbox per experiment the Host accepts, built from Host's whitelist so a newly whitelisted experiment shows up with no UI work. Each has a translated label and description, falling back to its key, and a tooltip naming the key scripts pass to setConfig(). The dialog uses Host::experimentGroup(), the same rule setExperimentEnabled() applies, so ticking one member of a group unticks the others, while the modern mapper and the 3D player marker (different groups) can both be on. Toggles go through Host::setExperimentEnabled(), and the 3D view swap for the modern mapper moves from setConfig() into Host so both routes get it. The card refreshes from the Host whenever the dialog is activated, so an experiment switched by a script shows up there. Experiments already persist per profile through the profile XML; the new functional test proves the round trip for one ticked in the dialog. Assisted-by: Claude:Opus 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NL8qdhrqWbWpL59XwmN6pJ
Every experiment so far only changes the modern 3D map, so a build made without it would offer five checkboxes that do nothing. Assisted-by: Claude:Opus 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NL8qdhrqWbWpL59XwmN6pJ
Also say what the experiments spec actually covers: Host, not the dialog. Assisted-by: Claude:Opus 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NL8qdhrqWbWpL59XwmN6pJ
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
|
[Medium impact] Adds experiments UI to profile preferences with mutual exclusion logic. The PR appears safe to merge, with a non-blocking gap in tests for renderer switching. Reviews (1) · Last reviewed commit: "Use range-based loops over the experimen..." · Reviewed by Greptile |
Assisted-by: Claude:Opus 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NL8qdhrqWbWpL59XwmN6pJ
|
Before/after demo, recorded headless (Xvfb) with a demo map open in the 3D view (30 s):
Video: pr11946-experiments-settings.mp4 (raw) Generated by Claude Code |
Opens the legacy 3D view, ticks and unticks "Modern 3D mapper" in the dialog, and checks the view's renderer class after each change. It fails with the recreate3DView() call in Host::setExperimentEnabled() stubbed out. Telling the classes apart needs no GL context, so it runs under ctest's offscreen platform. Assisted-by: Claude:Opus 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NL8qdhrqWbWpL59XwmN6pJ
Shown, each QOpenGLWidget tries to make a GL context, and on the leak job's offscreen platform the contexts from those failed attempts are reported by LeakSanitizer - the case asan-suppressions.txt asks tests to avoid. The view now lives in a hidden map dock: the swap still happens and is still checked, and no context is ever constructed (0 against 8 before, counted with a breakpoint on QOpenGLContext's constructor). Assisted-by: Claude:Opus 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NL8qdhrqWbWpL59XwmN6pJ
|
The
I'm re-running the failed job once. Generated by Claude Code |
Resolve the setConfig() conflict: development added an update3DViewAvailability() call next to the recreate3DView() call that this branch moved into Host::setExperimentEnabled(). It moves there too, so a map window's 3D button follows the renderer whether the change comes from Lua, the preferences dialog or a profile import. Drop the TMapViewsFrontend.h include from TLuaInterpreter.cpp, which only that block used. Assisted-by: Claude:Opus 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NL8qdhrqWbWpL59XwmN6pJ
The Experiments card on the Advanced page with every box unticked, the same card with "Modern 3D mapper" and "Original level shading" ticked, and the 3D map on the modern renderer right after ticking the box. Assisted-by: Claude:Opus 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NL8qdhrqWbWpL59XwmN6pJ
Brief overview of PR changes/additions
Adds an Experiments (unsupported) card to the Advanced page of profile preferences. It has one checkbox for each experiment in the profile's whitelist (
Host::mValidExperiments), so scripts no longer have to callsetConfig("experiment....", true)to try one.Host::getValidExperiments(). Each known experiment gets a translatable label and description (with//:translator comments). An experiment without a label still shows up under its raw key. Every checkbox's tooltip shows the key scripts use.Host::experimentGroup(), whichsetExperimentEnabled()also uses.experiment.rendering.originalishunticksexperiment.rendering.more-transparentand vice versa. The description says so ("Turning this on turns off: ...").experiment.3dmap.modernmapperandexperiment.3d-player-iconare in different groups, so both can be on.Host::setExperimentEnabled(). The 3D view swap thatsetConfig()used to do for the modern mapper now lives inHost::setExperimentEnabled(). It runs the same way whether the change comes from Lua, from the dialog, or from a profile/package import. The swap is a no-op unless a 3D view is open on the other renderer.setConfig()from a script while the dialog is open shows up when you return to the dialog.INCLUDE_3DMAPPER(e.g. thelinux-lowspecpreset) hide the card, and search skips it.Motivation for adding to Mudlet
Experiments could only be switched on from a script. That made it hard for players to find them and try them out, and we want people to test the new 3D mapper.
Screenshots
The new card on Preferences → Advanced, with every experiment off:
"Modern 3D mapper" and "Original level shading" ticked. Each description in the rendering group names the experiment it turns off:
The 3D map on the modern renderer right after ticking "Modern 3D mapper" in the dialog (taken headless on Xvfb, cropped to the 3D scene):
Other info (issues closed, discussion etc)
Persistence: no new mechanism was added. Experiments are already saved with the profile:
XMLexportwrites<experiment key="..." enabled="yes"/>andXMLimportreads them back throughsetExperimentEnabled(). Storing them anywhere else (e.g. the globalMudlet.ini) would have created a second source of truth, out of step with the profile-scoped Lua API. The new testtest_aTickedExperimentIsSavedWithTheProfileAndReadBackticks an experiment in the dialog, saves the profile, and checks the saved XML. It then clears the experiment and loads the XML back to confirm the experiment returns.Tests:
SettingsExperimentsTest, added to the existingfunctional_settings_testsgroup (no new binary). It covers:recreate3DView()call is removed. It keeps the map dock hidden so no GL context is created, which the leak-detection job requires.Other_spec.lua:getConfig()(fails ondevelopment).CommandLineSpellCheckTest, which fails on this machine only because noen_USdictionary is available in the build dir.setConfig("experiment.3dmap.modernmapper", false)switched it back.The DCO sign-off from the human maintainer is still pending: they will add
Signed-off-byafter building and testing the change themselves.Test case: open a profile, then Preferences → Advanced → "Experiments (unsupported)". Open the 3D map and tick "Modern 3D mapper": the 3D view switches renderer. Run
lua setConfig("experiment.3dmap.modernmapper", false)and return to the dialog: the box is unticked. Tick "Original level shading" and then "Darken other levels": the first one unticks. Save and reopen the profile: the ticked experiments are still on.Assisted-by: Claude:Opus 5.5
🤖 Generated with Claude Code
https://claude.ai/code/session_01NL8qdhrqWbWpL59XwmN6pJ
Generated by Claude Code