Skip to content

Feat/lsp UI integration - #2

Open
gat0sy wants to merge 7 commits into
mainfrom
feat/lsp-ui-integration
Open

Feat/lsp UI integration#2
gat0sy wants to merge 7 commits into
mainfrom
feat/lsp-ui-integration

Conversation

@gat0sy

@gat0sy gat0sy commented Aug 8, 2026

Copy link
Copy Markdown
Owner

No description provided.

bajrangCoder and others added 7 commits August 4, 2026 13:07
…ation#2621)

* fix(editor): prevent false language mode recommendations

- recommend only language-mode plugins available in the registry
- suppress built-in, extensionless, and arbitrary file false positives
- remove the direct plugin-request issue action
- add regression tests for unknown extensions

* fix the stale network cache things
…tion#2553)

* fix(admob): harden consent, banners, and variant builds

- integrate UMP consent handling and reactive privacy choices
- serialize adaptive banner visibility across pages and keyboard changes
- make free and paid Cordova variant configuration idempotent
- commit and validate a deterministic self-contained AdMob bundle
- remove vulnerable legacy toolchains and update affected lockfiles
- replace the legacy soft-input workaround with adjustResize
- add tests, lockfile checks, bundle freshness, and security auditing to CI

* fix(admob): harden banner suppression and variant builds

- make banner suppression reason-aware across Pro and rewarded passes
- centralize reward state refresh, expiry scheduling, and failure handling
- remove stale Cordova consent and persisted AdMob variant metadata
- add ES2020-compatible access and Java 21 Android native CI coverage
- enforce transient plugin setup and clean tracked build state
- remove the obsolete large-screen quicktools tutorial

* fix: dev

* chore: remove CI workflow changes

---------

Co-authored-by: Ajit Kumar <dellevenjack@gmail>
Co-authored-by: Raunak Raj <71929976+bajrangCoder@users.noreply.github.com>
…oundation#2627)

* feat(lsp): support multiple language servers per editor

* fix: spell

* fix(lsp): honor diagnostics provider opt-out

* refactor(lsp): consume standalone multi-server client

* fix
LspToPosition threw range error on format error.
We attempt to fix it here with by clamping so we get the correct line count between the client and server.

applyTextEdit as also been extracted so both transport and client manager can import it from the helper.
go to def and similar fonction have been added,
a new interceptFileLink method has been created to solve an FileUriExposedException you may get if taping the signature link on the hover.

if the link is a website, it skips and let the normal behavior occur ( open a web browser page )
if the link is a file, it modifies the uri so the tap behave like a go to instead of crashing the whole app.
There are notably also some fixes for code actions, rename...ect, now they use the new lspPostionToOffset that uses clamping
…actions menu

Added resolveContentUriForFileUri() to map LSP file:// responses back to
content:// and sftp:// URIs via addedFolder matching

Refactor editorManager displayFile/openFile to resolve URIs before
opening, enabling cross-workspace go-to-definition and references

Added SFTP path-aware root URI resolution for remote workspace context

Replace selection menu code-actions button with full LSP actions menu
(definition, declaration, implementation, type-definition, references,
rename, code-actions) with single-item auto-execution
@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds multi-server LSP UI integration and substantially revises advertising consent, banner lifecycle, Cordova configuration, and build tooling.

  • Adds definitions, references, diagnostics, code actions, inlay hints, document colors, workspace edits, and multi-client LSP management.
  • Introduces consent coordination and banner visibility/suppression policies across JavaScript and the native AdMob plugin.
  • Updates Cordova configuration, dependencies, development scripts, and focused unit/native tests.

Confidence Score: 2/5

This PR should not merge until workspace edits are constrained to authorized files and WebSocket reconnection restores a valid initialized LSP session.

A connected language server can direct edits to accessible files outside its workspace, and a successful reconnect leaves the replacement server connection without protocol initialization or open-document synchronization.

Files Needing Attention: src/cm/lsp/transport.ts, src/lib/editorManager.js

Security Review

The workspace/applyEdit path trusts server-selected URIs and can open and modify an accessible file outside the active workspace. How this was verified: The incoming URI was traced through workspace.displayFile and the host openFile callback with no workspace-root validation before the supplied edits are dispatched.

Important Files Changed

Filename Overview
src/cm/lsp/transport.ts Adds server-request handling and automatic reconnection, but workspace edits lack URI scoping and reconnects do not restore the LSP protocol/document session.
src/lib/editorManager.js Integrates per-pane LSP attachment and file display callbacks; the callback accepts resolved server-selected URIs without enforcing the active workspace boundary.
src/cm/lsp/clientManager.ts Adds multi-client selection, document attachment, workspace scoping, and idle disposal with generally distinct client keys and explicit detach handling.
src/lib/bannerVisibilityController.mjs Introduces serialized banner visibility and named suppression state; inspected error and transition handling did not establish an actionable defect.
src/lib/adConsentCoordinator.mjs Coordinates consent state and one-time ad initialization with retryable initialization when consent later permits ads.
src/plugins/admob/src/android/cordova/ads/Banner.kt Reworks native banner loading, visibility, layout margins, reloads, and lifecycle handling with explicit state transitions.
utils/config.js Substantially revises Cordova configuration generation and is accompanied by broad configuration tests.

Comments Outside Diff (1)

  1. src/cm/lsp/transport.ts, line 415-423 (link)

    P1 Reconnect loses LSP session state

    When an unexpected WebSocket closure is followed by a successful reconnect, this callback only marks the replacement socket connected; it does not reinitialize the LSP session or resend didOpen for tracked documents, causing subsequent changes and feature requests to be rejected or ignored until the client or files are reopened.

Reviews (1): Last reviewed commit: "feat(editor): resolve LSP file:// URIs a..." | Re-trigger Greptile

Comment thread src/cm/lsp/transport.ts
Comment on lines +203 to +206
let view = workspace.getFile(uri)?.getView();
if (!view) {
try {
view = await workspace.displayFile(uri);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 security Workspace edit escapes workspace scope

When a configured LSP server sends workspace/applyEdit for an accessible URI outside the active workspace, this handler opens that URI without a workspace-root check and dispatches the supplied edits, allowing unrelated file content to be modified and later saved. How this was verified: The server-controlled URI was traced through workspace.displayFile and the host openFile callback with no workspace-root validation before the edits are dispatched.

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.

3 participants