Skip to content

Conversation

codeofdusk
Copy link
Contributor

@codeofdusk codeofdusk commented Aug 17, 2025

Link to issue number:

Closes #11064.

Summary of the issue:

When invoking the standard "report status bar" gesture in Visual Studio Code, NVDA says "no status line found".

Description of how this pull request fixes the issue:

Adds logic to detect (by role or IAccessible2 ID) the status bar, caching it when found. Also added a custom text override to move the line and column to the start for speech-friendliness.

Testing strategy:

Tested in various document types (plain text, Python) in Visual Studio Code.

Known issues with pull request:

The status bar is not cached on app launch since the tree interceptor is disabled. If this override is removed, status bar accesses are always fast. With the override, the first access of the status bar takes about a second on my machine.

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@Copilot Copilot AI review requested due to automatic review settings August 17, 2025 00:07
@codeofdusk codeofdusk requested a review from a team as a code owner August 17, 2025 00:07
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for reporting the Visual Studio Code status bar when using NVDA's standard status bar gesture (NVDA+End on desktop/NVDA+Shift+End on laptop), addressing the issue where NVDA previously reported "no status line found".

  • Implements status bar detection by role and IAccessible2 ID with caching functionality
  • Adds custom text processing to filter decorative elements and prioritize line/column information
  • Caches status bar objects for improved performance on subsequent accesses

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
user_docs/en/changes.md Documents the new Visual Studio Code status bar reporting feature
source/appModules/code.py Implements status bar detection, caching, and custom text formatting logic

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@codeofdusk codeofdusk force-pushed the code-statusbar branch 3 times, most recently from 836b0d6 to aa69ace Compare August 17, 2025 01:18
@hwf1324
Copy link
Contributor

hwf1324 commented Aug 17, 2025

Related: #11064, #17339

@codeofdusk codeofdusk force-pushed the code-statusbar branch 9 times, most recently from 070e48c to 29eb24b Compare August 17, 2025 03:42
@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Aug 18, 2025
@SaschaCowley
Copy link
Member

@codeofdusk have you looked at the discussion in these issues?

Related: #11064, #17339

@codeofdusk
Copy link
Contributor Author

@SaschaCowley Yes, is there something I should look at specifically?

Also, I think the PR build failure is unrelated, as the last commit simply updated what's new per @seanbudd

Copy link
Member

@seanbudd seanbudd left a comment

Choose a reason for hiding this comment

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

Do you know if it's feasible to create a system test for this?

I think it should be possible to install VS code on Windows with GitHub actions fairly easily.

Now that we are able to run system tests in parallel, we are free to create a more thorough set of system tests for more applications.
I think it would be worth setting up system tests for VS code, as it's easy to install software.
In future, if we can install FOSS software, I think we should create system tests for it.

name: Install VS Code on Windows

on: [push]

jobs:
  build:
    runs-on: windows-latest

    steps:
    - name: Download and Install VS Code
      if: matrix.testSuite == "codium"
      run: |
        # Download the VS Code User Setup installer
        Invoke-WebRequest -Uri "https://code.visualstudio.com/sha/download?build=stable&os=win32-x64-user" -OutFile "VSCodeSetup.exe"

        # Install VS Code silently
        .\VSCodeSetup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART
      shell: powershell

@codeofdusk
Copy link
Contributor Author

@seanbudd Do we have system tests for other third-party software? If not, I imagine we wouldn't want to run those for local users (that feels like a larger discussion).

@seanbudd
Copy link
Member

@codeofdusk - no, mostly due to issues I've outlined in #18762. I think it's fine for these to run locally. It's rare when someone needs to use runsystemtests.bat, and when they do, they should probably be filtering to specific tests anyway. I don't think we'd ever recommend running all system tests locally, it's what our CI is for. Especially, as we plan to expand them, running them locally might take up to an hour. Our system tests are very device dependent e.g. version and language of windows.

@codeofdusk codeofdusk requested a review from seanbudd August 20, 2025 04:57
@seanbudd
Copy link
Member

@codeofdusk - please add a system test as requested

@seanbudd seanbudd marked this pull request as draft August 20, 2025 04:59
@codeofdusk codeofdusk force-pushed the code-statusbar branch 2 times, most recently from ceace8e to 810d064 Compare August 21, 2025 07:32
@codeofdusk
Copy link
Contributor Author

@seanbudd That fixed it! I'll go ahead and remove the logging.

@codeofdusk codeofdusk force-pushed the code-statusbar branch 6 times, most recently from 97abaea to 93ca8bd Compare August 21, 2025 20:01
Co-authored-by: Sean Budd <[email protected]>
seanbudd
seanbudd previously approved these changes Aug 21, 2025
Copy link
Member

@seanbudd seanbudd left a comment

Choose a reason for hiding this comment

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

Thanks @codeofdusk

@seanbudd seanbudd merged commit ecf99d9 into nvaccess:master Aug 22, 2025
27 checks passed
@github-actions github-actions bot added this to the 2026.1 milestone Aug 22, 2025
@codeofdusk codeofdusk deleted the code-statusbar branch August 22, 2025 01:48
@SaschaCowley
Copy link
Member

@codeofdusk it The code for moving the line/column number first in the status bar doesn't seem to be working for me. When I get the status bar in VS Code, I get:

nvda-pr (Git) - Push 1 commits to origin/moreWinBindings2 remote nvda-pr (Git) nvda-pr (Git) - moreWinBindings2, Checkout Branch/Tag... Infos: 5 git-pull-request Pull Request #18860 Notifications nvda (3.13.7), d:\projects\nvda-pr.venv\Scripts\python.exe Python Editor Language Status: $(warning) 5 Spell, next: Auto-Import Completions: true, next: Ruff (native), next: $(copilot) No inline suggestion available, Inline suggestions LF UTF-8 Tab Size: 4 Ln 2, Col 39 Screen Reader Optimized git-commit Michael Curran (3 days ago)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vsCode statusbar not properly read
4 participants