Skip to content

fix(tasks): share GitHub task query semantics with mobile - #11121

Closed
MumuTW wants to merge 2 commits into
stablyai:mainfrom
MumuTW:task/10950-mobile-task-query-parity
Closed

MumuTW wants to merge 2 commits into
stablyai:mainfrom
MumuTW:task/10950-mobile-task-query-parity

Conversation

@MumuTW

@MumuTW MumuTW commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Share GitHub task preset and scoping logic between desktop and mobile.
  • Make mobile recognize the existing is:pull-request alias and PR-only qualifiers consistently with desktop.
  • Use token-aware scope detection so quoted text and qualifier values are not mistaken for explicit issue/PR scopes.
  • Keep the removed legacy all view normalized to issues in mobile state while retaining exhaustive query mapping for persisted settings.

Addresses the task-query parity portion of #10950. Mobile Jira/provider availability remains intentionally out of scope.

Screenshots

No visual change.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • Added or updated high-quality tests that would catch regressions, or explained why tests were not needed

Targeted validation:

  • Shared task-query suite: 48 tests passed
  • Mobile GitHub task-query suite: 12 tests passed
  • Root web and mobile TypeScript typechecks passed
  • Touched-file root/mobile oxlint and oxfmt --check passed
  • git diff --check passed after rebasing onto current origin/main

AI Review Report

The adversarial review compared desktop/mobile query behavior, persisted preset handling, provider boundaries, quoted search text, and the mobile picker options. It caught that an initial version could resurrect the removed all view in mobile state despite no matching picker option. CodeRabbit later identified raw-regex scope detection that could misclassify quoted text; the final version uses one token-aware detector across shared and mobile code and directly tests the mobile kind resolver.

Cross-platform compatibility was reviewed for macOS, Linux, and Windows. This change only transforms GitHub search strings and does not alter shortcuts, labels, paths, shells, or Electron-specific platform behavior.

Security Audit

No command execution, filesystem paths, authentication, secrets, dependencies, or IPC contracts changed. User-entered search text is still passed through the existing GitHub query path; the shared function only adds or preserves recognized scope qualifiers.

Notes

This PR does not add Jira to mobile and does not remove mobile-task-providers.ts.

@MumuTW
MumuTW marked this pull request as ready for review July 28, 2026 07:27
@coderabbitai

coderabbitai Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

GitHub task preset, scope, and kind-resolution logic is centralized in shared modules. Mobile task handling and renderer workspace code now use the shared helpers, while query parsing recognizes unquoted is:issue, is:pr, and is:pull-request qualifiers. Shared and mobile tests cover preset mappings, alias preservation, quoted tokens, and pull-request inference.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and accurately summarizes the main change: sharing GitHub task query semantics with mobile.
Description check ✅ Passed The description matches the template and includes summary, screenshots, testing, AI review, security audit, and notes.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/shared/task-query.test.ts (1)

25-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add negative scope-detection cases.

These tests cover only valid explicit aliases. Add cases such as "is:issue" and label:"is:issue" to ensure raw text is not mistaken for an explicit scope qualifier.

mobile/src/tasks/mobile-github-task-query.test.ts (1)

15-21: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Exercise the mobile parser, not only the shared helper.

This suite calls scopeGitHubTaskSearch directly and does not exercise mobile githubKindFromQuery at Line 907. A regression in mobile is:pull-request recognition would still pass; add a focused seam or integration test for that path.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3073496c-fd98-4657-b680-4d84507fa9b3

📥 Commits

Reviewing files that changed from the base of the PR and between df9f559 and 8f2edd570b000d6affbf42c9819eb955296605eb.

📒 Files selected for processing (6)
  • mobile/app/h/[hostId]/tasks.tsx
  • mobile/src/tasks/mobile-github-task-query.test.ts
  • src/renderer/src/components/TaskPage.tsx
  • src/renderer/src/lib/new-workspace.ts
  • src/shared/task-query.test.ts
  • src/shared/task-query.ts

Comment thread src/shared/task-query.ts Resolved
@MumuTW
MumuTW force-pushed the task/10950-mobile-task-query-parity branch from 8f2edd5 to 48e6412 Compare July 28, 2026 07:44
@AmethystLiang
AmethystLiang requested a review from OrcaWin July 28, 2026 16:48
@MumuTW

MumuTW commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

Closing this PR. I am not going to keep iterating contribution PRs here; if a report is useful I will file an issue instead.

@MumuTW MumuTW closed this Sep 12, 2026
@MumuTW
MumuTW deleted the task/10950-mobile-task-query-parity branch September 12, 2026 13:08
nwparker added a commit that referenced this pull request Oct 14, 2026
Use one token-based task search implementation on desktop and mobile. Preserve explicit issue/PR qualifiers, distinguish quoted search text, and follow shared reexports in mounted mobile recordings.

Refs #10950 and #11121.

Co-authored-by: MumuTW <42820974+MumuTW@users.noreply.github.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.

2 participants