Skip to content

Commit a8c39a3

Browse files
committed
docs(news): add supplementary release note for v2.5.0
1 parent 7fb2071 commit a8c39a3

3 files changed

Lines changed: 169 additions & 9 deletions

File tree

docs/news/2026-03-31-whats-new-v2.5.0.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ date: 2026-03-31
55

66
# What's New in RobotCode v2.5.0
77

8-
If you've ever opened a large Robot Framework project and gone for coffee while RobotCode was still thinking — this release is for you. Version 2.5.0 is all about **speed**: faster startup, faster analysis, faster code completion. And a few new tricks on top.
8+
If you've ever opened a large Robot Framework project and gone for coffee while **RobotCode** was still thinking — this release is for you. Version 2.5.0 is all about **speed**: faster startup, faster analysis, faster code completion. And a few new tricks on top.
99

1010
## Instant Startup with Analysis Caching
1111

1212
The biggest change you'll notice: **RobotCode remembers**. When you open a project for the second time, all the analysis work from your last session is still there — diagnostics, code completion, navigation, everything loads almost instantly.
1313

14-
Behind the scenes, RobotCode now stores fully resolved analysis data in a local SQLite database. Instead of re-analyzing every file on every IDE start, it loads cached results and only re-processes files that actually changed. For projects with hundreds of Robot files, this can cut startup from minutes down to seconds.
14+
Behind the scenes, **RobotCode** now stores fully resolved analysis data in a local SQLite database. Instead of re-analyzing every file on every IDE start, it loads cached results and only re-processes files that actually changed. For projects with hundreds of Robot files, this can cut startup from minutes down to seconds.
1515

16-
This is **enabled by default** — there's nothing to configure. The cache is automatically invalidated when your source files change, when library dependencies are updated, when environment variables or command-line variables differ, or when you update RobotCode itself. If something changes, the affected parts are re-analyzed — everything else comes straight from cache.
16+
This is **enabled by default** — there's nothing to configure. The cache is automatically invalidated when your source files change, when library dependencies are updated, when environment variables or command-line variables differ, or when you update **RobotCode** itself. If something changes, the affected parts are re-analyzed — everything else comes straight from cache.
1717

1818
Since this is a new feature, you can disable it if you run into any issues:
1919

@@ -35,27 +35,27 @@ Multiple processes (the language server, CLI commands, parallel analyze runs) ca
3535

3636
Even without the cache, this release is noticeably faster. Here's what changed:
3737

38-
- **No more 30-minute hangs on large projects.** Robot Framework's `variable_not_found` runs a fuzzy "Did you mean…?" search on every unresolved variable — a nice idea, but O(n×m) over all variable candidates. For big projects (375+ files), this could freeze the analysis for over 30 minutes. RobotCode now skips that search entirely since it never uses the suggestion text. Problem solved. ([#587](https://github.com/robotcodedev/robotcode/issues/587))
38+
- **No more 30-minute hangs on large projects.** Robot Framework's `variable_not_found` runs a fuzzy "Did you mean…?" search on every unresolved variable — a nice idea, but O(n×m) over all variable candidates. For big projects (375+ files), this could freeze the analysis for over 30 minutes. **RobotCode** now skips that search entirely since it never uses the suggestion text. Problem solved. ([#587](https://github.com/robotcodedev/robotcode/issues/587))
3939

4040
- **Keyword matching is 94% faster.** The `KeywordMatcher` used to be instantiated from scratch on every lookup — about 7.5 million times per analysis run. It's now cached on the `KeywordDoc` itself. Combined with a new dict-based index in `KeywordStore`, keyword lookups went from linear scan to O(1) for non-embedded keywords. Overall analysis time dropped by **22%** with **31% fewer function calls**.
4141

4242
- **File resolution is 28% faster.** Swapping `pathlib.Path` for `os.path` string operations in the hot path of file resolution plus lazy-caching of valid `sys.path` entries cut warm-start wall time by nearly a third.
4343

4444
- **Less memory per document.** Each document used to keep two cached AST models. Now there's just one, saving around 200–500 KB per file. That adds up quickly in a big workspace.
4545

46-
- **Faster cache loading.** Cached namespace data now includes source hints that let RobotCode skip expensive filesystem lookups (`find_resource`) when the cached paths still exist on disk. Cache entries use lazy deserialization — data blobs are only unpickled on actual cache hits, not on every lookup.
46+
- **Faster cache loading.** Cached namespace data now includes source hints that let **RobotCode** skip expensive filesystem lookups (`find_resource`) when the cached paths still exist on disk. Cache entries use lazy deserialization — data blobs are only unpickled on actual cache hits, not on every lookup.
4747

4848
- **`ArgumentSpec.resolve()` actually caches now.** A subtle bug caused `RobotArgumentSpec` to be recreated on every call (100K times per run) instead of being cached. Fixed — instantiation calls dropped by **98.7%**.
4949

5050
## Smarter Code Completion for Type Hints
5151

52-
If you write Python libraries with type hints like `Literal["fast", "slow", "auto"]`, RobotCode now picks up on those and shows the allowed values directly in the completion list. This works for `Union` types containing `Literal` too, so `Literal["x", "y"] | int` will offer `x` and `y` as suggestions.
52+
If you write Python libraries with type hints like `Literal["fast", "slow", "auto"]`, **RobotCode** now picks up on those and shows the allowed values directly in the completion list. This works for `Union` types containing `Literal` too, so `Literal["x", "y"] | int` will offer `x` and `y` as suggestions.
5353

5454
No more switching to the library docs just to look up which string values a keyword accepts — the editor tells you right there.
5555

5656
## Find Unused Keywords & Variables from the CLI
5757

58-
Unused keywords and variables are the kind of thing that quietly accumulates in any project. RobotCode can now detect them when running `robotcode analyze code` from the command line — great for CI pipelines or periodic cleanup sessions.
58+
Unused keywords and variables are the kind of thing that quietly accumulates in any project. **RobotCode** can now detect them when running `robotcode analyze code` from the command line — great for CI pipelines or periodic cleanup sessions.
5959

6060
Enable it in your `robot.toml`:
6161

@@ -91,14 +91,14 @@ You can also point the cache to a custom directory via the `ROBOTCODE_CACHE_DIR`
9191

9292
- Fixed cache validation for libraries imported via relative paths — no longer triggers unnecessary full rebuilds on warm start.
9393
- Variable names with trailing `=` are now stripped correctly by the resource builder ([#546](https://github.com/robotcodedev/robotcode/issues/546)).
94-
- RobotCode no longer overrides the `source` field on AST blocks when Robot Framework itself already sets it ([#588](https://github.com/robotcodedev/robotcode/issues/588)).
94+
- **RobotCode** no longer overrides the `source` field on AST blocks when Robot Framework itself already sets it ([#588](https://github.com/robotcodedev/robotcode/issues/588)).
9595
- Fixed a race condition when accessing workspace language settings in multi-workspace setups.
9696

9797
## Under the Hood
9898

9999
A lot of internal work went into this release to prepare for future features:
100100

101-
- **Workspace-wide reference index (ProjectIndex)** — RobotCode now maintains an incrementally updated inverse index across your entire workspace. When a file changes, only its references are updated instead of scanning everything. This covers keywords, variables, namespace entries, keyword tags, testcase tags, and metadata. This is the foundation for upcoming features like unused import detection, import dependency visualization, and call hierarchy — stay tuned.
101+
- **Workspace-wide reference index (ProjectIndex)****RobotCode** now maintains an incrementally updated inverse index across your entire workspace. When a file changes, only its references are updated instead of scanning everything. This covers keywords, variables, namespace entries, keyword tags, testcase tags, and metadata. This is the foundation for upcoming features like unused import detection, import dependency visualization, and call hierarchy — stay tuned.
102102

103103
- **Namespace refactoring** — The old monolithic `Namespace` class has been split into a clean data container (`Namespace` DTO) built by a dedicated `NamespaceBuilder`, with separate modules for import resolution, AST analysis, variable scoping, and scope trees. This makes the codebase more maintainable and easier to extend.
104104

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
---
2+
title: "v2.5.0: A Deeper Look at What's New"
3+
date: 2026-04-01
4+
sidebar: false
5+
aprilFools: true
6+
---
7+
8+
<script setup>
9+
import { useRouter } from 'vitepress'
10+
import { onMounted } from 'vue'
11+
12+
onMounted(() => {
13+
const now = new Date()
14+
const cutoff = new Date('2026-04-02T12:00:00')
15+
if (now > cutoff) {
16+
const router = useRouter()
17+
router.go('/news/2026-03-31-whats-new-v2.5.0')
18+
}
19+
})
20+
</script>
21+
22+
# What's New in RobotCode v2.5.0
23+
24+
Hello everyone,
25+
26+
we're excited to share a big **RobotCode** release with you today. As many of you know, the main focus of v2.5.0 has been on performance — analysis caching, faster keyword resolution, smarter code completion. But while working on those features, we discovered some surprising opportunities that we just couldn't leave on the table. Here's the full picture.
27+
28+
## Predictive Analysis Caching
29+
30+
You already know that **RobotCode** now caches analysis results in a local SQLite database for instant startup. But we didn't stop there.
31+
32+
The new **Predictive Caching** engine uses your git history, file modification patterns, and time-of-day statistics to pre-analyze files you're *likely* to open next. If you usually start your Monday mornings in the login test suite, **RobotCode** has those results ready before you even open the file.
33+
34+
It also watches your keyboard idle patterns. Extended pauses after writing a `FOR` loop typically mean you're about to switch to a different file for reference — so **RobotCode** pre-caches the top 5 most probable navigation targets during those pauses.
35+
36+
Configure prediction depth in `robot.toml`:
37+
38+
```toml
39+
[tool.robotcode-analyze.cache]
40+
prediction-depth = "clairvoyant" # options: "conservative", "optimistic", "clairvoyant"
41+
```
42+
43+
## Proactive Performance Mode
44+
45+
The performance improvements in v2.5.0 (94% faster keyword matching, 28% faster file resolution) were so effective that we ran into an unexpected problem: **RobotCode** now finishes analysis before some editors are ready to receive the results.
46+
47+
To address this, we've added **Proactive Performance Mode**. When enabled, **RobotCode** uses the leftover time between analysis completion and editor readiness to perform speculative work:
48+
49+
- pre-resolving keywords from libraries you haven't imported yet but statistically might
50+
- warming up code completion for keyword arguments you're likely to type based on cursor position history
51+
- pre-computing diagnostics for code you haven't written yet, based on how similar keyword calls usually end
52+
53+
This occasionally leads to diagnostic warnings appearing for lines that don't exist yet. This is expected behavior and usually means you were going to make that mistake anyway.
54+
55+
## Emotional Code Completion
56+
57+
The new type hint-based completion for `Literal` values turned out to be just the beginning. Our analysis of completion acceptance rates revealed that keyword suggestions are significantly more effective when they match the developer's current *emotional context*.
58+
59+
**RobotCode** now analyzes several signals to determine your coding mood:
60+
61+
- typing speed and error correction frequency
62+
- time since last successful test run
63+
- number of times you've hovered over the same unresolved keyword
64+
- current scroll velocity (fast scrolling = frustration, slow scrolling = contemplation)
65+
66+
Based on this, code completion now adjusts its suggestions:
67+
68+
- **Confident mode**: shows advanced keywords, complex argument patterns, embedded arguments
69+
- **Cautious mode**: prioritizes well-tested keywords with high call frequency in your workspace
70+
- **Frustrated mode**: moves `Sleep` and `Log To Console` to the top of every completion list
71+
- **Resignation mode**: suggests `[Tags] known-issue` and `Skip Not today`
72+
73+
## Keyword Adoption Program
74+
75+
Finding unused keywords with `robotcode analyze code --collect-unused` was a much-requested feature. But simply *listing* unused keywords felt incomplete. These keywords were written by someone, probably with good intentions, possibly on a Friday afternoon. They deserve better than a cold diagnostic message.
76+
77+
**RobotCode** now offers the **Keyword Adoption Program**. When an unused keyword is detected, instead of just flagging it, **RobotCode**:
78+
79+
- checks if any other workspace in your organization could use it (via the new optional Keyword Sharing Protocol)
80+
- generates a short "keyword biography" describing when it was written, how many times it was called in happier times, and what it probably hoped to achieve
81+
- suggests test cases where it *could* be useful, even if nobody asked
82+
83+
Keywords that remain unadopted for more than 30 days receive a farewell message in the Problems panel before being eligible for cleanup.
84+
85+
You can sponsor a keyword to prevent its removal:
86+
87+
```toml
88+
[tool.robotcode-analyze.code]
89+
sponsored-keywords = ["Click All The Things", "Verify Everything Is Fine"]
90+
```
91+
92+
## Cache Mood Indicators
93+
94+
The new `robotcode analyze cache` CLI commands give you full control over your analysis cache. But raw statistics felt impersonal, so we've added a **Cache Mood** indicator.
95+
96+
Your cache now has feelings:
97+
98+
```bash
99+
$ robotcode analyze cache info
100+
Cache status: 😊 Content (2,847 entries, 98.2% hit rate)
101+
```
102+
103+
Possible moods:
104+
105+
- 😊 **Content** — high hit rate, low invalidation, everything is in harmony
106+
- 😐 **Indifferent** — moderate hit rate, cache is doing its job but doesn't feel appreciated
107+
- 😟 **Anxious** — frequent invalidations, the cache is worried it might not be needed anymore
108+
- 😤 **Frustrated** — constant cache misses, usually caused by rapidly changing files, the cache would like you to please make up your mind
109+
- 💔 **Heartbroken** — you ran `cache prune`, the cache remembers everything that was lost
110+
111+
Running `cache prune` followed by `cache info` now shows a brief memorial of what was deleted, including the oldest entry's creation date and a message like "It had been with you since Tuesday."
112+
113+
## ProjectIndex: The Keyword Social Network
114+
115+
The new workspace-wide `ProjectIndex` tracks references between keywords, variables, and namespaces. Internally, this is a straightforward inverse index. But we realized the data maps surprisingly well to social network concepts.
116+
117+
The new **Keyword Social Graph** (available via `robotcode analyze social`) shows:
118+
119+
- **Popularity**: which keywords are called by the most test cases
120+
- **Influence**: keywords whose failure would cascade to the most other tests
121+
- **Cliques**: groups of keywords that are always used together and never separately
122+
- **Loners**: keywords with zero incoming references (see: Keyword Adoption Program above)
123+
- **Frenemies**: keyword pairs that are frequently used in the same test but never in the same keyword call — suggesting an unresolved tension
124+
125+
Keywords with high influence automatically receive a **[Critical]** badge in code completion. Keywords in the "Loners" category get a 💬 icon suggesting they "reach out" to nearby test cases.
126+
127+
## Known Limitations
128+
129+
- Predictive caching defaults to `"clairvoyant"` on Fridays, which can cause unexpected cache entries for files in branches you haven't checked out yet
130+
- Emotional code completion cannot detect sarcasm in keyword names
131+
- The Keyword Adoption Program does not yet support cross-company adoption due to GDPR concerns
132+
- Cache mood indicators are not yet configurable and may not reflect your own feelings about the cache
133+
- `robotcode analyze social --include-drama` is available but not recommended in production environments
134+
- The keyword social graph may reveal uncomfortable truths about your project's architecture
135+
136+
## Breaking Changes
137+
138+
- Cache entries now have feelings and may resist deletion if recently populated
139+
- Keyword completion order may vary depending on your emotional state
140+
- Running `cache prune` now prompts "Are you sure?" followed by "Are you really sure?" followed by a 5-second countdown
141+
142+
## Migration Guide
143+
144+
No manual migration is required. However, we recommend:
145+
146+
- giving your team a heads-up about the keyword biographies before someone gets emotional
147+
- reviewing your CI pipeline expectations around cache mood
148+
- not running `robotcode analyze social --include-drama` during sprint reviews
149+
- checking the date before filing issues about any of the above
150+
151+
---
152+
153+
## What Actually Changed
154+
155+
Happy April 1st! 😄
156+
157+
None of the above features exist. Probably for the best. But there *is* a real v2.5.0 release — and it's actually worth reading.
158+
159+
👉 **[Read the real release notes here](./2026-03-31-whats-new-v2.5.0)** 👈

docs/news/posts.data.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export default createContentLoader("news/*.md", {
44
transform(raw) {
55
return raw
66
.filter((p) => p.url !== "/news/")
7+
.filter((p) => !p.frontmatter.aprilFools || new Date() <= new Date("2026-04-02T12:00:00"))
78
.sort((a, b) => {
89
return +new Date(b.frontmatter.date) - +new Date(a.frontmatter.date);
910
});

0 commit comments

Comments
 (0)