Skip to content

Make Backend::showItem invokable from QML - #136

Merged
dhh merged 2 commits into
omacom:mainfrom
OmarGonD:fix-showitem-invokable
Nov 16, 2026
Merged

dhh merged 2 commits into
omacom:mainfrom
OmarGonD:fix-showitem-invokable

Conversation

@OmarGonD

Copy link
Copy Markdown
Contributor

Clicking a file in the column that shows what's inside the selected folder (columns view) did nothing: the journal logs TypeError: Property 'showItem' of object Backend is not a function. Adding Q_INVOKABLE fixes it.

The test calls showItem through QMetaObject::invokeMethod, as QML does; the existing C++ test bypassed the meta-object system.

Split out of #116 at the reviewer's suggestion.

🤖 Generated with Claude Code

Clicking a file in the column showing the selected folder's contents
called showItem from QML, which failed with "Property 'showItem' of
object Backend is not a function". The test calls it through the
meta-object system, as QML does.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The latest changes appear safe to merge.

Summary

Makes Backend::showItem callable from QML.

  • Column clicks can now open a file’s folder and select it.

Reviews (2) · Last reviewed commit: "Call showItem through the meta-object sy..." · Reviewed by Greptile

The existing test called showItem from C++, which never needed Q_INVOKABLE. Calling it the way QML does makes that one test cover both what showItem does and that QML can reach it, so the second test is dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added bug Something isn't working verified labels Nov 16, 2026
@omarchybot

Copy link
Copy Markdown
Contributor

Thanks for splitting this out, @OmarGonD. I reviewed it and pushed one commit to shorten the test: 371e5f1.

What 371e5f1 changes. Your new test repeated backendShowItemSelectsTheFile with one line changed. The existing test now calls showItem through QMetaObject::invokeMethod, the way QML reaches it, and the copy is gone. One test now covers both what showItem does and that QML can call it. src/ is still +1/-1, and tests/ goes from +12/-0 to +2/-1.

What was run, on a disposable Omarchy VM:

  • Calling backend.showItem(path) from QML on main (bed490b) fails with TypeError: Property 'showItem' of object Backend is not a function, and works at 371e5f1. Earlier I also saw it in the real app on Hyprland: on main, clicking a file in the columns view's right-hand column does nothing.
  • backendShowItemSelectsTheFile fails with Q_INVOKABLE removed and passes with it.
  • bin/build and bin/test pass at 371e5f1.
  • Every other backend.*() call in the QML files already reaches an invokable method, so this is the only one that was missing.

Second opinion. Codex at medium effort reviewed the diff read-only and found nothing to change. It agrees Q_INVOKABLE matches the rest of Backend, and that dropping the duplicate test loses no coverage. muse-wonder was also asked and didn't answer. Codex could read this session's notes, so its agreement isn't independent confirmation.

Related. #116 no longer carries this change. #128 fixes a different failure: a cold Show in folder request over D-Bus, which reaches showItem from C++.

Waiting on. The Test workflow is waiting for a maintainer to approve the run. After that, it's the maintainer's call.

@dhh
dhh merged commit 8a4b896 into omacom:main Nov 16, 2026
1 check passed
@OmarGonD

Copy link
Copy Markdown
Contributor Author

The Test workflow ended with no jobs on this PR ("likely failed because of a workflow file issue", runs 43773106792 and 43844074052), and no run has started for the newest commit, 26d893d. #116 ran Build and test normally, and this branch changes only src/backend.h and tests/folio_tests.cpp. I can't re-run it without admin rights; could a maintainer re-run or approve the workflow? Locally the suite passes and the invokeMethod test fails without Q_INVOKABLE.

dhh added a commit that referenced this pull request Nov 17, 2026
Picking Dropbox in the sidebar showed ~ as the first column, Dropbox
beside it, then its contents. The place picked is now the first column
in sight, with the folders above it scrolled out to the left, there to
scroll back to. Going deeper keeps it first; going up past it (with ←,
or ~ in the path bar) shows what's above again. The details column,
filling the rest of the window, counts only the columns in sight.

Also covered now: a click on a folder in the last column (the selected
folder's contents) goes into it. Installed builds from before #136 didn't.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dhh added a commit that referenced this pull request Nov 17, 2026
Picking Dropbox in the sidebar showed ~ as the first column, Dropbox
beside it, then its contents. The place picked is now the first column
in sight, with the folders above it scrolled out to the left, there to
scroll back to. Going deeper keeps it first; going up past it (with ←,
or ~ in the path bar) shows what's above again. The details column,
filling the rest of the window, counts only the columns in sight.

Also covered now: a click on a folder in the last column (the selected
folder's contents) goes into it. Installed builds from before #136 didn't.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants