Skip to content

add: Show tutorial invitation on first launch#9169

Draft
vadi2 wants to merge 16 commits into
developmentfrom
worktree-worktree1
Draft

add: Show tutorial invitation on first launch#9169
vadi2 wants to merge 16 commits into
developmentfrom
worktree-worktree1

Conversation

@vadi2
Copy link
Copy Markdown
Member

@vadi2 vadi2 commented Apr 8, 2026

Brief overview of PR changes/additions

  • On first launch (no existing profiles), show a focused tutorial invitation instead of the full games list
  • "Start Tutorial" link launches the Mudlet Tutorial profile directly
  • "Skip - show me the games list" button reveals the full connection dialog

Motivation for adding to Mudlet

New users currently face a wall of 20+ unknown game names with no guidance - a focused tutorial invitation improves first-time retention by teaching basics before choosing a game.

A user who completes the tutorial understands triggers, aliases, and navigation - making them far more likely to pick a game from the list and stick with it. The games list is one click away via the skip button, so no functionality is removed.

Other info (issues closed, discussion etc)

First launch only - experienced users and bootstrap/telnet:// URI launches are unaffected.

Test case: Delete ~/.config/mudlet/profiles/ (back it up first), launch Mudlet, verify tutorial invitation appears. Click "Start Tutorial" - should launch tutorial. Restart with profiles restored - should show normal dialog.

image

On first launch, hide the profile list and show a focused
tutorial invitation. "Start Tutorial" launches the Mudlet
Tutorial directly. "Skip - show me the games list" reveals
the full connection dialog.
@vadi2 vadi2 requested a review from a team as a code owner April 8, 2026 21:50
@add-deployment-links
Copy link
Copy Markdown

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

  • linux: (download pending, check back soon!)
  • osx intel: (download pending, check back soon!)
  • osx arm: (download pending, check back soon!)
  • windows 64 bit: (download pending, check back soon!)

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 8, 2026

Vulnerabilities

No security concerns identified. The tutorial link uses a hardcoded "mudlet-tutorial" URL string comparison, and the welcome_message widget has setOpenLinks(false) and setOpenExternalLinks(false), preventing arbitrary URL navigation.

Comments Outside Diff (1)

  1. src/dlgConnectionProfiles.cpp, line 796-797 (link)

    P1 Tutorial mode re-triggered after "Skip" → "New Profile"

    fillout_form() re-enters tutorial mode whenever mProfileList.isEmpty() && firstMudletLaunch — which stays true after "Skip" is clicked. When the user then clicks "New Profile", fillout_form() hides widget_topLeft, shows mpSkipToGamesButton, and hides connect_button/offline_button again. The two lines that follow only hide welcome_message and show the right-panel widgets; they don't reverse those state changes. The user is left with an invisible profile list and no connect/offline buttons.

        fillout_form();
        welcome_message->hide();
        // restore normal-mode widgets that fillout_form() may have hidden
        widget_topLeft->show();
        mpSkipToGamesButton->hide();
        connect_button->show();
        offline_button->show();
        informationArea->show();
        tabWidget_connectionInfo->show();

Reviews (1): Last reviewed commit: "add first-launch tutorial experience" | Re-trigger Greptile

Comment thread src/dlgConnectionProfiles.cpp Outdated
@vadi2 vadi2 marked this pull request as draft April 9, 2026 08:26
vadi2 added a commit that referenced this pull request Apr 11, 2026
#### Brief overview of PR changes/additions
Increased test timeouts in TelnetTextDisplayedTest - profile load from
1s to 5s, telnet connect from 500ms to 2s.

#### Motivation for adding to Mudlet
CI runners are slower than local machines, causing the test to
consistently time out and segfault (the QPointer access after timeout
triggers a crash). This was blocking PR #9169 and likely other PRs
touching the same CI jobs.

#### Other info (issues closed, discussion etc)
Fixes flaky TelnetTextDisplayedTest failures seen across all CI
platforms (Linux, macOS, Windows).

Ideally the root cause (crash on timeout) would be fixed, but since the
cost here is just a few extra seconds of wait time, increasing the
timeouts is a proportionate fix.
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 15, 2026

Comments Outside Diff (1)

  1. test/functional_tests/TDiscordModeTest.cpp, line 78-93 (link)

    P1 Missing tutorial invitation dismissal before clicking new_profile_button

    new_profile_button lives inside widget_topLeft (verified in connection_profiles.ui), which is hidden by fillout_form() whenever firstMudletLaunch && mProfileList.isEmpty() && !mTutorialDismissed. Because the profile directory is cleaned before this test, both conditions hold — so widget_topLeft (and everything in it, including new_profile_button and all input fields) is hidden when initTestCase runs. slot_addProfile is triggered by the click, but profile_name_entry->setFocus() on a hidden widget fails, leaving QApplication::focusWidget() null; subsequent keyClicks become no-ops, no profile is configured, and spy.wait(1000) times out with QFAIL.

    TelnetTextDisplayedTest had exactly this problem and was fixed in commit 71381a4. Apply the same guard here:

    mudlet::self()->startAutoLogin({});
    QTest::qWait(100);
    // Dismiss tutorial invitation if shown on first launch
    auto* skipBtn = mudlet::self()->mpConnectionDialog->findChild<QPushButton*>(qsl("skipToGamesButton"));
    if (skipBtn && skipBtn->isVisible()) {
        QTest::mouseClick(skipBtn, Qt::LeftButton);
        QTest::qWait(100);
    }
    QTest::mouseClick(mudlet::self()->mpConnectionDialog->new_profile_button, Qt::LeftButton);

Reviews (2): Last reviewed commit: "Fix: give TDiscordModeTest unique port t..." | Re-trigger Greptile

vadi2 and others added 6 commits April 15, 2026 08:29
TriggerEditorTest and dlgTriggerEditorUndoRedoTest were never patched for
the tutorial banner; clicking the hidden new_profile_button was a no-op so
signal_profileLoaded never fired. The other three tests had dismissal but
their 1000 ms wait was tighter than the chained 100 ms qWaits, leaving no
headroom on CI.
Adds mudlet::signal_connectionDialogShown, emitted from
slot_showConnectionDialog after the dialog's deferred show(). Tests now
connect once with Qt::SingleShotConnection and call the new
dlgConnectionProfiles::dismissTutorialInvitation() slot directly, instead
of polling findChild + isVisible() inside a chain of QTest::qWait calls.
Also extracts the old inline button-click handler into the same slot so
the user-facing button reuses it.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 25, 2026

Warnings
⚠️ PR makes changes to 11 source files. Double check the scope hasn't gotten out of hand

Generated by 🚫 dangerJS against f9613c6

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 25, 2026

Reviews (3): Last reviewed commit: "Replace tutorial-dismiss polling with si..." | Re-trigger Greptile

@vadi2 vadi2 marked this pull request as ready for review April 25, 2026 10:30
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 25, 2026

Reviews (4): Last reviewed commit: "Replace tutorial-dismiss polling with si..." | Re-trigger Greptile

@vadi2 vadi2 marked this pull request as draft April 25, 2026 10:48
Adds qDebug() tracing through the profile creation flow to diagnose
timeouts on signal_profileLoaded under offscreen + ASan in CI:
dlgConnectionProfiles tutorial dismissal, fillout_form, slot_addProfile,
signal_load_profile emit; mudlet::slot_showConnectionDialog timer and
slot_connectionDialogueFinished. TriggerEditorTest startProfile traces
focus widget at each step. To revert once CI failure is diagnosed.
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