Skip to content

Reporter dialog: log tab order, PasteBin only uploads one log, dead/blank report links #53

Description

@soloturn

AI-assisted issue. Filed by agent driven by @soloturn via GDD.

Context

Found while testing the reporter dialog end-to-end after the macOS subprocess-isolation fix
(#52) and Terasology's logFileFolder_IS_UNDEFINED fix (MovingBlocks/Terasology#5343 - which
is why there are now correctly two log files/tabs to notice the ordering issue with). Five
separate UI/workflow bugs observed in one test pass through the reporter dialog.

Problem / Current State

1. Log tabs are ordered by file creation time, not name

With two log files present (Terasology-init.log, Terasology-menu.log), the tabs don't
appear in alphabetical order. This is intentional-but-surprising current behavior, not a bug in
the sort implementation itself: ErrorMessagePanel.sortLogFiles() explicitly sorts by
BasicFileAttributes.creationTime(), reversed (newest first) - see
cr-core/src/main/java/org/terasology/crashreporter/pages/ErrorMessagePanel.java:166-184. Worth
deciding deliberately whether creation-time-descending or alphabetical is the intended UX -
right now it's easy to read as "broken" since it looks arbitrary.

2. PasteBin upload only includes the currently-selected tab's log, not all of them

UploadPanel is constructed with a single Supplier<String> for the log text
(ErrorMessagePanel.getLog(), which returns textAreas.get(tabPane.getSelectedIndex()).getText()

  • see ErrorMessagePanel.java:236-239). With multiple log files/tabs, only whichever one happens
    to be selected when "PasteBin" is clicked gets uploaded
    (UploadPanel.java:74-81); the other file's content never gets included anywhere in the report.

3. "Report Issue" (GitHub) opens a completely empty new-issue form

FinalActionsPanel's GitHub button just does
openInBrowser(properties.get(KEY.REPORT_ISSUE_LINK)) -
cr-core/src/main/java/org/terasology/crashreporter/pages/FinalActionsPanel.java:88-97 - a bare
static URL (https://github.com/MovingBlocks/Terasology/issues/new, from
cr-terasology/src/main/resources/crashreporter.properties:2) with no query parameters. The
uploaded PasteBin link is available in the same class, right there as uploadedFile.get()
(used a few lines later at FinalActionsPanel.java:158 for the copy-link field) - it's just never
threaded into the GitHub URL. GitHub's issue-creation URL supports title=/body= query
parameters for pre-filling a new issue; none are used here.

4. "Join Discord" gives a permission-denied-style failure even when already logged in

Configured invite link: JOIN_DISCORD_LINK=https://discord.gg/terasology
(cr-terasology/src/main/resources/crashreporter.properties:3). Reported as failing with a
permission-denied result in a browser that's already logged into Discord elsewhere. Not
independently verified here (this needs testing directly against Discord's invite flow, which
I can't drive), but the configured link is a vanity/custom invite code, which Discord can
revoke or restrict independently of the server itself remaining active - worth checking whether
this invite is still valid server-side.

5. "Go to Forum" opens a dead URL

Configured link: SUPPORT_FORUM_LINK=http://forum.terasology.org/forum/support.20/
(cr-terasology/src/main/resources/crashreporter.properties:1, plain http://, not https://).
Confirmed via a direct request: the domain resolves but returns HTTP 500 Internal Server Error, not a working forum page.

Acceptance Criteria

  • Log tab ordering is either changed to alphabetical or intentionally documented/confirmed as
    creation-time-based (whichever is decided as correct UX).
  • PasteBin (or whatever upload mechanism replaces/joins it) includes all log files present,
    not just the currently-selected tab.
  • "Report Issue" opens GitHub with the issue body pre-filled with the crash summary and the
    PasteBin/upload link, not a blank form.
  • "Join Discord" successfully opens a working, current invite (or the root cause of the
    permission-denied result is identified and fixed/documented).
  • "Go to Forum" points at a working URL, or the button/link is removed if the forum no longer
    exists in a supportable form.

Technical Notes

  • cr-core/src/main/java/org/terasology/crashreporter/pages/ErrorMessagePanel.java -
    sortLogFiles() (creation-time sort), getLog()/getLogFile() (single-selected-tab getters
    that UploadPanel depends on).
  • cr-core/src/main/java/org/terasology/crashreporter/pages/UploadPanel.java - constructed with
    singular Supplier<String>/Supplier<String> for text/filename; would need to become
    multi-file-aware (e.g. concatenate all log tabs' content, or upload each separately and list
    all resulting links) to fix More detailed labels / on-hover text #2.
  • cr-core/src/main/java/org/terasology/crashreporter/pages/FinalActionsPanel.java - all three
    external-link buttons (joinDiscord, githubIssueButton, forumButton), all just calling
    openInBrowser(properties.get(KEY...)) with a static configured URL and no dynamic content.
  • cr-terasology/src/main/resources/crashreporter.properties - the three configured URLs
    (SUPPORT_FORUM_LINK, REPORT_ISSUE_LINK, JOIN_DISCORD_LINK).
  • For Provide hardware and software configuration #3, GitHub's new-issue URL supports ?title=...&body=... query parameters - the fix is
    likely building that URL dynamically in FinalActionsPanel instead of using the static
    REPORT_ISSUE_LINK property directly, using uploadedFile.get() and the throwable/log summary
    already available elsewhere in the dialog.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions