NavigaraNavigara
OrganizationsDistributionCompareResearch
NavigaraNavigara
OrganizationsDistributionCompareResearch
All developers

John Van Schultz

Developer

John Van Schultz

jvansch@meta.com

285 commits~3 files/commit

Performance

2026Previous year

Insights

Key patterns and highlights from this developer's activity.

Peak MonthDec'25576 performance
Growth Trend↓67%vs prior period
Avg Files/Commit3files per commit
Active Days78of 455 days
Top Repopyrefly285 commits

Effort Over Time

Breakdown of growth, maintenance, and fixes effort over time.

Bug Behavior

Beta

Bugs introduced vs. fixed over time.

Investment Quality

Beta

Reclassifies engineering effort based on bug attribution. Commits that introduced bugs are retrospectively counted as poor investments.

51%Productive TimeGrowth 86% + Fixes 14%
44%Maintenance Time
5%Wasted Time
How it works

Methodology

Investment Quality reclassifies engineering effort based on bug attribution data. Commits identified as buggy origins (those that introduced bugs later fixed by someone) have their grow and maintenance time moved into the Wasted Time category. Their waste (fix commits) remains counted as productive. All other commits retain their standard classification: grow is productive, maintenance is maintenance, and waste (fixes) is productive.

Relationship to Growth / Maintenance / Fixes

The standard model classifies commits as Growth, Maintenance, or Fixes. Investment Quality adds a quality lens: a commit that introduced a bug is retrospectively counted as a poor investment — the engineering time spent on it was wasted because it ultimately required additional fix work. Fix commits (Fixes in the standard model) are reframed as productive, because fixing bugs is valuable work.

Proposed API Endpoint

Currently computed client-side from commit and bug attribution data. Ideal server-side endpoint:

POST /v1/organizations/{orgId}/investment-quality
Content-Type: application/json

Request:
{
  "startTime": "2025-01-01T00:00:00Z",
  "endTime": "2025-12-31T23:59:59Z",
  "bucketSize": "BUCKET_SIZE_MONTH",
  "groupBy": ["repository_id" | "deliverer_email"]
}

Response:
{
  "productivePct": 74,
  "maintenancePct": 18,
  "wastedPct": 8,
  "buckets": [
    {
      "bucketStart": "2025-01-01T00:00:00Z",
      "productive": 4.2,
      "maintenance": 1.8,
      "wasted": 0.6
    }
  ]
}

Recent Activity

Latest analyzed commits from this developer.

HashMessageDateFilesEffort
f3886aeThis commit introduces a **telemetry enhancement** by plumbing `agent_session_id` and `agent_invocation_id` through the core **`Server` component** in `pyrefly`. It modifies the `Server` struct to store these identifiers, updates its constructor `Server::new()` to accept them, and ensures `telemetry_state()` reports actual values instead of hardcoded `None`. The `lsp_loop()` and `run_tsp()` entry points are updated to extract these IDs from the telemetry object and pass them to the `Server` constructor. This change significantly improves the **observability and correlation of agent sessions and invocations** across the `pyrefly` service's operations.Mar 252grow
d353eccThis commit **enhances the `Telemetry` trait** within the `pyrefly_util` crate by introducing `agent_session_id()` and `agent_invocation_id()` methods. This **new capability** allows for the generic exposure of agent session and invocation identifiers, following the pattern of the existing `surface()` method. Implementations like `NoTelemetry` will return `None`, while `ScubaTelemetry` will provide values read from the environment. This change **decouples call sites** from specific telemetry implementations, enabling broader and more abstract access to these critical IDs across the system, including in test environments.Mar 252grow
f19eb41This commit introduces **new telemetry tracking capabilities** to **Pyrefly's telemetry pipeline** by adding `agent_session_id` and `agent_invocation_id` fields to the `TelemetryServerState` struct in `crates/pyrefly_util/src/telemetry.rs`. This **enhances data correlation** by providing dedicated, agent-agnostic identifiers for sessions and invocations, which will be populated from environment variables for AI agents like Claude Code. The `pyrefly/lib/lsp/non_wasm/server.rs` file is updated to initialize these new fields to `None` within the `to_telemetry_server_state` method. This change lays the groundwork for subsequent serialization to Scuba, enabling exact joins between `pyrefly_events` and agent-specific logs, thus improving the analysis of AI agent interactions with Pyrefly.Mar 252grow
0c22767This commit introduces a **new capability** to the **LSP server's `goto_definition` handler** by adding post-processing for **Thrift stub locations**. Specifically, it integrates a `thrift_remapper` into the `goto_definition()` method in `pyrefly/lib/lsp/non_wasm/server.rs` to transform results pointing to generated Thrift stubs into their original `.thrift` source file locations. This **enhancement** improves navigation accuracy for **Thrift definitions** by remapping the target location if a corresponding source file is found. The change is implemented as a post-processing step, ensuring that while **Thrift-related go-to-definition queries** provide more precise results, the behavior for non-Thrift symbols remains entirely unaffected.Mar 251grow
0ee4e5eThis commit **integrates the Thrift remapper** into the Pyrefly LSP server's startup process within `facebook/main.rs`, specifically for Meta-internal builds. This **activates the go-to-definition feature** for Thrift-generated Python types, enabling fbcode Pyrefly users to navigate directly to the original `.thrift` source files instead of intermediate `.pyi` stubs. The `thrift_goto_def::create_thrift_remapper()` function is now called and its result passed to `args.run()` in the LSP command handler. This **enhances developer productivity** by providing more semantically relevant navigation for Thrift definitions. Supporting test utilities in `object_model.rs` and existing go-to-definition tests in `definition.rs` were also updated to verify this new behavior.Mar 252maint
752f3fdThis commit **prepares the LSP server infrastructure** by **threading an `Option<ThriftRemapper>` parameter** through the entire Language Server Protocol (LSP) command chain, mirroring the existing `PathRemapper` pattern. This **refactoring** adds the `thrift_remapper` field to the `Server` struct and updates `lsp_loop()` and `Server::new()` to accept it, ensuring the remapper can be stored and accessed. The change affects core LSP components like `lsp.rs` and `server.rs`, and updates entry points in `all.rs`, `tsp.rs`, and `object_model.rs` to pass `None`. This **enables future Thrift remapping capabilities** within the LSP server without altering current behavior for non-Facebook code paths.Mar 255grow
0523459This commit performs **maintenance** on the **LSP interaction test suite** within the `pyrefly` library by **removing a stale TODO comment**. Specifically, it updates the `test_incoming_call_hierarchy_basic` function in `pyrefly/lib/test/lsp/lsp_interaction/call_hierarchy.rs`, replacing an outdated comment with a **descriptive docstring**. This change improves the **readability and maintainability of the test code**, ensuring that the documentation accurately reflects the fully implemented and validated `incoming call hierarchy` feature.Mar 241maint
e68ee5aThis commit **enhances telemetry** for the **Glean Integration** by accurately tracking the full time taken for external reference resolution. It introduces a new metric, `ext_ref_resolve_locations_ms`, within the `TelemetryExternalReferencesStats` struct in `crates/pyrefly_util/src/telemetry.rs` to specifically record the duration of the potentially expensive resolution step. Consequently, the existing `process_ms` metric is updated to encompass this resolution time, providing a more comprehensive and accurate measure of the entire external reference processing workflow. This **telemetry improvement** ensures better visibility into performance bottlenecks for indexed reference lookups.Mar 201grow
dbb7d43This commit introduces a **new capability** by **re-exporting** the `ThriftRemapper` type, making it part of the **`pyrefly` library crate's public API**. The `ThriftRemapper`, originally defined within `lsp::non_wasm::module_helpers`, is now exposed directly through `pyrefly/lib/lib.rs` alongside `PathRemapper`. This change allows downstream applications, specifically `bin/facebook/main.rs`, to import `ThriftRemapper` via the standard `pyrefly::library` path, ensuring consistent access to core library components. The primary impact is on the **`pyrefly` module's public interface** and its consumers, streamlining module imports.Mar 191grow
6b5fe17This commit introduces the `ThriftRemapper` type alias within `pyrefly/lib/lsp/non_wasm/module_helpers.rs` to lay the groundwork for **restoring go-to-definition support** for Thrift-generated Python types. This **new capability** will allow users to navigate from a Python stub directly to its original `.thrift` source file, significantly improving the developer experience. Unlike the existing `PathRemapper`, `ThriftRemapper` operates on a complete `lsp_types::Location` to handle both path and symbol-level range adjustments, which is crucial for accurate remapping within the **LSP module** of Pyrefly.Mar 191grow
6856e26This commit **adds a new test case** to the `pyrefly` **LSP interaction tests** that specifically targets the **go-to-definition behavior for Thrift types**. The test, `thrift_go_to_def_currently_goes_to_stub`, demonstrates and asserts that `pyrefly` currently directs users to the `.pyi` stub file instead of the original `.thrift` source file. This **maintenance work** documents a known limitation in `pyrefly`'s **Thrift type resolution**, serving as a baseline for future **feature development** aimed at aligning `pyrefly` with Pyright's more advanced capabilities for **Thrift definition navigation**. This is a crucial step towards enabling the **complete removal of Pyright in FBCode** by addressing a key functional gap in `pyrefly`.Mar 196maint
b29644bThis commit **fixes** a **bug** in the **LSP's qualified name resolution** within `pyrefly` where `from ... import submodule` statements were incorrectly processed. Previously, the system failed to recognize imported submodules as actual modules, leading to incorrect or missing qualified names in tools like Glean. The change introduces a conditional check in `compute_qualified_name` to directly return the module name when the `SymbolKind` is `Module`, ensuring accurate reference data. This **bug fix** prevents incorrect references from being shown and improves the reliability of **code navigation and analysis tools**. A new test case `from_package_import_submodule` was added to verify this correct behavior.Mar 192waste
50fb37bThis commit performs a **code cleanup** by **removing obsolete `#[allow(dead_code)]` attributes** that had accumulated throughout the codebase. This **maintenance** task improves code hygiene by eliminating unnecessary warning suppressions, which were no longer valid. The change affects various modules across the entire project, ensuring that the compiler can more accurately identify genuinely unused code. This helps developers focus on relevant warnings and maintain a cleaner, more robust codebase.Mar 1720–
3c5feafThis commit introduces a **new capability** to **Pyrefly's call hierarchy** by adding the `convert_external_references_to_incoming_calls` function. This function processes raw external references provided by Glean, filtering them to identify actual call expressions and transforming them into `LSP CallHierarchyIncomingCall` items. It addresses a limitation where Pyrefly previously only found callers within locally indexed files, now leveraging **Glean integration** to include callers from external files. The new logic enhances the completeness of the call hierarchy, with processing capped at 50 external files to bound latency, making the feature more robust for large codebases.Mar 171grow
e02d994This commit **enhances the Language Server Protocol (LSP) `callHierarchy/incomingCalls` handler** in `pyrefly` by integrating **Glean external references**. Previously limited to local search, the `async_call_hierarchy_incoming_calls` function now runs local and Glean external searches in parallel using `std::thread::scope`. This **new capability** provides a **more comprehensive incoming call hierarchy** by including callers from files outside the local index. Glean results are converted to `CallHierarchyIncomingCall` and then deduplicated against local results by URI, ensuring a complete and non-redundant view for users.Mar 171grow
4b0473fThis commit implements a **bug fix** within the **LSP's qualified name computation** to correctly handle built-in types. Specifically, the `compute_qualified_name` function in `pyrefly/lib/lsp/non_wasm/external_provider.rs` is modified to **strip the `builtins.` module prefix** from qualified names for built-in types. This change resolves an inconsistency where built-in types were often indexed with their bare names, leading to significantly incomplete search results when the `builtins.` prefix was present. By aligning the qualified name generation with existing indexing patterns, this fix dramatically **improves the accuracy and completeness of search functionality** for built-in types within the system.Mar 161waste
d53f256This commit introduces the `find_enclosing_call_range` helper function within the **`pyrefly/lib/lsp/non_wasm/call_hierarchy.rs`** module, enhancing the **Language Server Protocol (LSP) call hierarchy** functionality. This **new capability** allows for precise identification of call expressions by determining if a given code position is within a `Call` expression's function range. By returning the full range of an enclosing call, this utility is crucial for filtering out non-call references from broader symbol reference results, ensuring that only actual call sites are considered for incoming call analysis. The function is thoroughly tested and will be leveraged in future work to refine the conversion of external references.Mar 161grow
f2a1a7eThis commit introduces a **new capability** by adding the `module_name_from_path` helper function to the `pyrefly/lib/lsp/non_wasm/call_hierarchy.rs` module. This function is designed to **derive fully-qualified Python module names** from file paths, which is crucial for constructing accurate caller names when processing Glean-derived external references for the **call hierarchy feature**. It intelligently walks up parent directories, identifying `__init__.py` markers to build the dotted module name. Comprehensive unit tests are included to cover various scenarios like standalone files, packages, and `.pyi` stubs, ensuring robust module name resolution. This enhancement improves the precision of code navigation and analysis within the LSP.Mar 161grow
9fe559aThis commit **fixes a bug** in the **LSP Call Hierarchy** implementation for incoming calls, where `CallHierarchyItem.range` and `selection_range` were incorrectly set to the same name identifier range, violating the LSP specification. The change **corrects the range values** by ensuring `range` uses the full function declaration range and `selection_range` uses the name identifier range. This involves **refactoring** the `find_containing_function_for_call` function to return both ranges, updating the `CallerInfo` struct, and adjusting `transform_incoming_calls` within `pyrefly/lib/lsp/non_wasm/call_hierarchy.rs`. This ensures **correct highlighting in editors** and full **adherence to the LSP specification** for call hierarchy results.Mar 161waste
995bb94This commit introduces a new `CallerInfo` struct to **refactor** how caller information is handled within **Pyrefly's LSP Call Hierarchy** feature. It replaces an opaque `(TextRange, String, TextRange)` tuple with a named struct containing `call_range`, `name`, and `def_range` fields, improving code clarity and maintainability. This change affects functions like `transform_incoming_calls`, `find_global_incoming_calls_from_function_definition`, and `collect_calls_from_expr`, making the system less error-prone and easier to extend for future enhancements like Glean integration. The **refactoring** is purely mechanical, with all existing consumers updated to use the struct, and introduces no behavioral changes to the **incoming call hierarchy** functionality.Mar 162maint
f3886aeMar 25

This commit introduces a **telemetry enhancement** by plumbing `agent_session_id` and `agent_invocation_id` through the core **`Server` component** in `pyrefly`. It modifies the `Server` struct to store these identifiers, updates its constructor `Server::new()` to accept them, and ensures `telemetry_state()` reports actual values instead of hardcoded `None`. The `lsp_loop()` and `run_tsp()` entry points are updated to extract these IDs from the telemetry object and pass them to the `Server` constructor. This change significantly improves the **observability and correlation of agent sessions and invocations** across the `pyrefly` service's operations.

2 filesgrow
d353eccMar 25

This commit **enhances the `Telemetry` trait** within the `pyrefly_util` crate by introducing `agent_session_id()` and `agent_invocation_id()` methods. This **new capability** allows for the generic exposure of agent session and invocation identifiers, following the pattern of the existing `surface()` method. Implementations like `NoTelemetry` will return `None`, while `ScubaTelemetry` will provide values read from the environment. This change **decouples call sites** from specific telemetry implementations, enabling broader and more abstract access to these critical IDs across the system, including in test environments.

2 filesgrow
f19eb41Mar 25

This commit introduces **new telemetry tracking capabilities** to **Pyrefly's telemetry pipeline** by adding `agent_session_id` and `agent_invocation_id` fields to the `TelemetryServerState` struct in `crates/pyrefly_util/src/telemetry.rs`. This **enhances data correlation** by providing dedicated, agent-agnostic identifiers for sessions and invocations, which will be populated from environment variables for AI agents like Claude Code. The `pyrefly/lib/lsp/non_wasm/server.rs` file is updated to initialize these new fields to `None` within the `to_telemetry_server_state` method. This change lays the groundwork for subsequent serialization to Scuba, enabling exact joins between `pyrefly_events` and agent-specific logs, thus improving the analysis of AI agent interactions with Pyrefly.

2 filesgrow
0c22767Mar 25

This commit introduces a **new capability** to the **LSP server's `goto_definition` handler** by adding post-processing for **Thrift stub locations**. Specifically, it integrates a `thrift_remapper` into the `goto_definition()` method in `pyrefly/lib/lsp/non_wasm/server.rs` to transform results pointing to generated Thrift stubs into their original `.thrift` source file locations. This **enhancement** improves navigation accuracy for **Thrift definitions** by remapping the target location if a corresponding source file is found. The change is implemented as a post-processing step, ensuring that while **Thrift-related go-to-definition queries** provide more precise results, the behavior for non-Thrift symbols remains entirely unaffected.

1 filesgrow
0ee4e5eMar 25

This commit **integrates the Thrift remapper** into the Pyrefly LSP server's startup process within `facebook/main.rs`, specifically for Meta-internal builds. This **activates the go-to-definition feature** for Thrift-generated Python types, enabling fbcode Pyrefly users to navigate directly to the original `.thrift` source files instead of intermediate `.pyi` stubs. The `thrift_goto_def::create_thrift_remapper()` function is now called and its result passed to `args.run()` in the LSP command handler. This **enhances developer productivity** by providing more semantically relevant navigation for Thrift definitions. Supporting test utilities in `object_model.rs` and existing go-to-definition tests in `definition.rs` were also updated to verify this new behavior.

2 filesmaint
752f3fdMar 25

This commit **prepares the LSP server infrastructure** by **threading an `Option<ThriftRemapper>` parameter** through the entire Language Server Protocol (LSP) command chain, mirroring the existing `PathRemapper` pattern. This **refactoring** adds the `thrift_remapper` field to the `Server` struct and updates `lsp_loop()` and `Server::new()` to accept it, ensuring the remapper can be stored and accessed. The change affects core LSP components like `lsp.rs` and `server.rs`, and updates entry points in `all.rs`, `tsp.rs`, and `object_model.rs` to pass `None`. This **enables future Thrift remapping capabilities** within the LSP server without altering current behavior for non-Facebook code paths.

5 filesgrow
0523459Mar 24

This commit performs **maintenance** on the **LSP interaction test suite** within the `pyrefly` library by **removing a stale TODO comment**. Specifically, it updates the `test_incoming_call_hierarchy_basic` function in `pyrefly/lib/test/lsp/lsp_interaction/call_hierarchy.rs`, replacing an outdated comment with a **descriptive docstring**. This change improves the **readability and maintainability of the test code**, ensuring that the documentation accurately reflects the fully implemented and validated `incoming call hierarchy` feature.

1 filesmaint
e68ee5aMar 20

This commit **enhances telemetry** for the **Glean Integration** by accurately tracking the full time taken for external reference resolution. It introduces a new metric, `ext_ref_resolve_locations_ms`, within the `TelemetryExternalReferencesStats` struct in `crates/pyrefly_util/src/telemetry.rs` to specifically record the duration of the potentially expensive resolution step. Consequently, the existing `process_ms` metric is updated to encompass this resolution time, providing a more comprehensive and accurate measure of the entire external reference processing workflow. This **telemetry improvement** ensures better visibility into performance bottlenecks for indexed reference lookups.

1 filesgrow
dbb7d43Mar 19

This commit introduces a **new capability** by **re-exporting** the `ThriftRemapper` type, making it part of the **`pyrefly` library crate's public API**. The `ThriftRemapper`, originally defined within `lsp::non_wasm::module_helpers`, is now exposed directly through `pyrefly/lib/lib.rs` alongside `PathRemapper`. This change allows downstream applications, specifically `bin/facebook/main.rs`, to import `ThriftRemapper` via the standard `pyrefly::library` path, ensuring consistent access to core library components. The primary impact is on the **`pyrefly` module's public interface** and its consumers, streamlining module imports.

1 filesgrow
6b5fe17Mar 19

This commit introduces the `ThriftRemapper` type alias within `pyrefly/lib/lsp/non_wasm/module_helpers.rs` to lay the groundwork for **restoring go-to-definition support** for Thrift-generated Python types. This **new capability** will allow users to navigate from a Python stub directly to its original `.thrift` source file, significantly improving the developer experience. Unlike the existing `PathRemapper`, `ThriftRemapper` operates on a complete `lsp_types::Location` to handle both path and symbol-level range adjustments, which is crucial for accurate remapping within the **LSP module** of Pyrefly.

1 filesgrow
6856e26Mar 19

This commit **adds a new test case** to the `pyrefly` **LSP interaction tests** that specifically targets the **go-to-definition behavior for Thrift types**. The test, `thrift_go_to_def_currently_goes_to_stub`, demonstrates and asserts that `pyrefly` currently directs users to the `.pyi` stub file instead of the original `.thrift` source file. This **maintenance work** documents a known limitation in `pyrefly`'s **Thrift type resolution**, serving as a baseline for future **feature development** aimed at aligning `pyrefly` with Pyright's more advanced capabilities for **Thrift definition navigation**. This is a crucial step towards enabling the **complete removal of Pyright in FBCode** by addressing a key functional gap in `pyrefly`.

6 filesmaint
b29644bMar 19

This commit **fixes** a **bug** in the **LSP's qualified name resolution** within `pyrefly` where `from ... import submodule` statements were incorrectly processed. Previously, the system failed to recognize imported submodules as actual modules, leading to incorrect or missing qualified names in tools like Glean. The change introduces a conditional check in `compute_qualified_name` to directly return the module name when the `SymbolKind` is `Module`, ensuring accurate reference data. This **bug fix** prevents incorrect references from being shown and improves the reliability of **code navigation and analysis tools**. A new test case `from_package_import_submodule` was added to verify this correct behavior.

2 fileswaste
50fb37bMar 17

This commit performs a **code cleanup** by **removing obsolete `#[allow(dead_code)]` attributes** that had accumulated throughout the codebase. This **maintenance** task improves code hygiene by eliminating unnecessary warning suppressions, which were no longer valid. The change affects various modules across the entire project, ensuring that the compiler can more accurately identify genuinely unused code. This helps developers focus on relevant warnings and maintain a cleaner, more robust codebase.

20 files–
3c5feafMar 17

This commit introduces a **new capability** to **Pyrefly's call hierarchy** by adding the `convert_external_references_to_incoming_calls` function. This function processes raw external references provided by Glean, filtering them to identify actual call expressions and transforming them into `LSP CallHierarchyIncomingCall` items. It addresses a limitation where Pyrefly previously only found callers within locally indexed files, now leveraging **Glean integration** to include callers from external files. The new logic enhances the completeness of the call hierarchy, with processing capped at 50 external files to bound latency, making the feature more robust for large codebases.

1 filesgrow
e02d994Mar 17

This commit **enhances the Language Server Protocol (LSP) `callHierarchy/incomingCalls` handler** in `pyrefly` by integrating **Glean external references**. Previously limited to local search, the `async_call_hierarchy_incoming_calls` function now runs local and Glean external searches in parallel using `std::thread::scope`. This **new capability** provides a **more comprehensive incoming call hierarchy** by including callers from files outside the local index. Glean results are converted to `CallHierarchyIncomingCall` and then deduplicated against local results by URI, ensuring a complete and non-redundant view for users.

1 filesgrow
4b0473fMar 16

This commit implements a **bug fix** within the **LSP's qualified name computation** to correctly handle built-in types. Specifically, the `compute_qualified_name` function in `pyrefly/lib/lsp/non_wasm/external_provider.rs` is modified to **strip the `builtins.` module prefix** from qualified names for built-in types. This change resolves an inconsistency where built-in types were often indexed with their bare names, leading to significantly incomplete search results when the `builtins.` prefix was present. By aligning the qualified name generation with existing indexing patterns, this fix dramatically **improves the accuracy and completeness of search functionality** for built-in types within the system.

1 fileswaste
d53f256Mar 16

This commit introduces the `find_enclosing_call_range` helper function within the **`pyrefly/lib/lsp/non_wasm/call_hierarchy.rs`** module, enhancing the **Language Server Protocol (LSP) call hierarchy** functionality. This **new capability** allows for precise identification of call expressions by determining if a given code position is within a `Call` expression's function range. By returning the full range of an enclosing call, this utility is crucial for filtering out non-call references from broader symbol reference results, ensuring that only actual call sites are considered for incoming call analysis. The function is thoroughly tested and will be leveraged in future work to refine the conversion of external references.

1 filesgrow
f2a1a7eMar 16

This commit introduces a **new capability** by adding the `module_name_from_path` helper function to the `pyrefly/lib/lsp/non_wasm/call_hierarchy.rs` module. This function is designed to **derive fully-qualified Python module names** from file paths, which is crucial for constructing accurate caller names when processing Glean-derived external references for the **call hierarchy feature**. It intelligently walks up parent directories, identifying `__init__.py` markers to build the dotted module name. Comprehensive unit tests are included to cover various scenarios like standalone files, packages, and `.pyi` stubs, ensuring robust module name resolution. This enhancement improves the precision of code navigation and analysis within the LSP.

1 filesgrow
9fe559aMar 16

This commit **fixes a bug** in the **LSP Call Hierarchy** implementation for incoming calls, where `CallHierarchyItem.range` and `selection_range` were incorrectly set to the same name identifier range, violating the LSP specification. The change **corrects the range values** by ensuring `range` uses the full function declaration range and `selection_range` uses the name identifier range. This involves **refactoring** the `find_containing_function_for_call` function to return both ranges, updating the `CallerInfo` struct, and adjusting `transform_incoming_calls` within `pyrefly/lib/lsp/non_wasm/call_hierarchy.rs`. This ensures **correct highlighting in editors** and full **adherence to the LSP specification** for call hierarchy results.

1 fileswaste
995bb94Mar 16

This commit introduces a new `CallerInfo` struct to **refactor** how caller information is handled within **Pyrefly's LSP Call Hierarchy** feature. It replaces an opaque `(TextRange, String, TextRange)` tuple with a named struct containing `call_range`, `name`, and `def_range` fields, improving code clarity and maintainability. This change affects functions like `transform_incoming_calls`, `find_global_incoming_calls_from_function_definition`, and `collect_calls_from_expr`, making the system less error-prone and easier to extend for future enhancements like Glean integration. The **refactoring** is purely mechanical, with all existing consumers updated to use the struct, and introduces no behavioral changes to the **incoming call hierarchy** functionality.

2 filesmaint

Work Patterns

Beta

Commit activity distribution by hour and day of week. Shows when this developer is most active.

Collaboration

Beta

Developers who frequently work on the same files and symbols. Higher score means stronger code collaboration.

NavigaraNavigara
OrganizationsDistributionCompareResearch