Skip to content

feat: add Troubleshooting submenu under Help (Show Logs + Open Developer Tools)#257

Open
rtibblesbot wants to merge 5 commits into
learningequality:mainfrom
rtibblesbot:issue-240-bce78e
Open

feat: add Troubleshooting submenu under Help (Show Logs + Open Developer Tools)#257
rtibblesbot wants to merge 5 commits into
learningequality:mainfrom
rtibblesbot:issue-240-bce78e

Conversation

@rtibblesbot

@rtibblesbot rtibblesbot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Plan: Add a Troubleshooting submenu under Help containing Show Logs and Open Developer Tools.

  • Show Logs + Troubleshooting submenu structure
  • Open Developer Tools

status

Summary

Adds a Troubleshooting submenu under Help containing two items that reduce support burden by giving users one-click access to debugging information:

  • Show Logs — opens KOLIBRI_HOME/logs in the platform's default file manager. Extracted from the existing on_open_kolibri_home into a shared _open_in_file_manager helper.
  • Open Developer Tools — opens the webview backend's developer tools window. Platform dispatch: COM vtable (ICoreWebView2::OpenDevToolsWindow) on Windows (same pattern as show_print_ui), ObjC runtime via ctypes on macOS (WKWebView _inspector), WebKitGTK ctypes on Linux. All failure paths log a warning rather than raising a user-visible dialog.

References

Closes #240

Reviewer guidance

Verification steps on Mac and Windows:

  1. Run asset.
  2. Help → Troubleshooting → Show Logs — file manager opens at $KOLIBRI_HOME/logs
  3. Help → Troubleshooting → Open Developer Tools — devtools/inspector panel appears for the current page
  4. File → Open Kolibri Home Folder — still works

AI usage

Implemented with Claude Code following a pre-approved plan (see issue #240). Scope and acceptance criteria were written by the maintainer before implementation.


@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?
  • Ran pre-flight CI checks (lint, format, tests) and verified all pass
  • Rebased onto the target branch and resolved any conflicts
  • Reorganized commit history into clean, logical commits
  • Audited the diff to ensure only issue-relevant files are changed
  • Built PR body from the repository's PR template with evidence blocks
@rtibblesbot

🟡 Waiting for feedback

Last updated: 2026-07-04 12:43 UTC

@rtibblesbot rtibblesbot marked this pull request as ready for review June 30, 2026 01:14

@rtibbles rtibbles left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Delete the test theater it adds nothing. We should be keeping consistent with the permission checks we already added for opening Kolibri Home - it's not clear to me if this has been branched from those changes or not.

Comment thread tests/test_troubleshooting.py Outdated
Comment thread src/kolibri_app/view.py Outdated
@rtibblesbot

Copy link
Copy Markdown
Contributor Author

All review feedback addressed in 1e46cba:

  • Deleted tests/test_troubleshooting.py and the test machinery.
  • Both Show Logs and Open Developer Tools submenu items now call .Enable(_kolibri_home_readable()), consistent with the Open Kolibri Home Folder guard.

Ready for re-review @rtibbles.

@rtibbles rtibbles left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Needs more cleanup - and now we have 3 commits for what should be a single commit. Finish the cleanup and squash to one commit to remove the churn.

Comment thread conftest.py Outdated
Comment thread src/kolibri_app/view.py Outdated
…Developer Tools

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rtibbles rtibbles self-assigned this Jun 30, 2026
@pcenov

pcenov commented Jul 3, 2026

Copy link
Copy Markdown
Member

Hi @rtibbles,

On Windows, selecting the Help → Troubleshooting → Open Developer Tools option results in seeing the previously viewed page, like a Back button:

Windows.app.dev.tools.mp4

Windows app logs: Windows logs.zip

On Mac, selecting the Help → Troubleshooting → Open Developer Tools option results in the app crashing:

Mac.app.mp4

Mac app logs: Logs and crash report.zip

rtibblesbot and others added 4 commits July 3, 2026 05:17
WKWebView preferences live on the configuration object, not the view
itself, and _setDeveloperExtrasEnabled: is the private selector that
actually takes effect. The WebView2 OpenDevToolsWindow vtable index was
also off; corrected via the extraction script. Consolidates the
per-platform devtools opener into a single try/except.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
main switched tool.uv.exclude-newer to a relative "7 days" span while
this branch's lockfile still recorded the old fixed-date value, which
the uv-lock pre-commit hook flags as inconsistent now that this branch
has main's pyproject.toml change.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The tuple-based (opener, exc_types, platform) dispatch obscured control
flow for a simple 3-branch function; explicit try/except per platform
is clearer and keeps the exception handling colocated with each call.

Co-Authored-By: Claude Sonnet 5 <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.

Add a Help → Troubleshooting submenu

3 participants