altimate-code 0.5.9 → 0.5.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.5.10] - 2026-03-24
9
+
10
+ ### Added
11
+
12
+ - **`altimate-code check` CLI command** — deterministic SQL checks (linting, formatting, style) that run without an LLM, suitable for CI pipelines and pre-commit hooks (#453)
13
+ - **Data-viz skill improvements** — lazy initialization, data-code separation, color contrast rules, icon semantics, field validation, and pre-delivery checklist (#434)
14
+
15
+ ### Fixed
16
+
17
+ - **Snowflake Cortex not visible before authentication** — provider now appears in the provider list even when not yet authenticated (#447)
18
+ - **New user detection race condition** — first-run welcome flow and telemetry events could fire out of order or be skipped entirely (#445)
19
+ - **52 CI test failures from `mock.module` leaking across files** — test isolation fix for the new `check` command e2e tests (#460)
20
+ - **Missing `altimate_change` marker** — added required upstream marker on `isStatelessCommand` guard to pass Marker Guard CI (#457)
21
+
22
+ ### Changed
23
+
24
+ - **Rename Recap back to Trace** — reverted the Recap branding to Trace across 29 files for better AI model comprehension of session recording concepts (#443)
25
+
26
+ ### Testing
27
+
28
+ - Consolidated 12 hourly test PRs into single batch: slugify, hints sort, skill formatting, batch tools, filesystem utilities, wildcard matching — 1,680 new test lines (#439)
29
+ - `altimate-code check` unit + e2e test suites (1,687 lines) (#453)
30
+ - Snowflake Cortex provider visibility tests (#447)
31
+
8
32
  ## [0.5.9] - 2026-03-23
9
33
 
10
34
  ### Fixed
@@ -32,7 +56,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
32
56
 
33
57
  ### Added
34
58
 
35
- - **Recap (renamed from Tracer)** — session recap with loop detection and enhanced viewer (#381)
59
+ - **Trace (session recording)** — session trace with loop detection and enhanced viewer (#381)
36
60
  - **ESM bundling regression tests** — 9 e2e tests verifying Node can load `altimate-dbt` via symlink, wrapper, and direct invocation paths
37
61
 
38
62
  ### Testing
package/README.md CHANGED
@@ -131,8 +131,8 @@ Manifest parsing, test generation, model scaffolding, incremental model detectio
131
131
  ### Data Visualization
132
132
  Interactive charts and dashboards from SQL results. The data-viz skill generates publication-ready visualizations with automatic chart type selection based on your data.
133
133
 
134
- ### Local-First Recap
135
- Built-in observability for AI interactions — recap tool calls, token usage, and session activity locally. No external services required. View recaps with `altimate recap`. Features include loop detection, post-session summary, and shareable HTML exports.
134
+ ### Local-First Tracing
135
+ Built-in observability for AI interactions — trace tool calls, token usage, and session activity locally. No external services required. View session recordings with `altimate trace`. Features include loop detection, post-session summary, and shareable HTML exports.
136
136
 
137
137
  ### AI Teammate Training
138
138
  Teach your AI teammate project-specific patterns, naming conventions, and best practices. The training system learns from examples and applies rules automatically across sessions.
package/package.json CHANGED
@@ -14,24 +14,24 @@
14
14
  "scripts": {
15
15
  "postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
16
16
  },
17
- "version": "0.5.9",
17
+ "version": "0.5.10",
18
18
  "license": "MIT",
19
19
  "dependencies": {
20
20
  "@altimateai/altimate-core": "^0.2.5"
21
21
  },
22
22
  "optionalDependencies": {
23
- "@altimateai/altimate-code-linux-x64": "0.5.9",
24
- "@altimateai/altimate-code-windows-arm64": "0.5.9",
25
- "@altimateai/altimate-code-linux-arm64-musl": "0.5.9",
26
- "@altimateai/altimate-code-darwin-x64": "0.5.9",
27
- "@altimateai/altimate-code-windows-x64": "0.5.9",
28
- "@altimateai/altimate-code-linux-x64-musl": "0.5.9",
29
- "@altimateai/altimate-code-darwin-x64-baseline": "0.5.9",
30
- "@altimateai/altimate-code-linux-x64-baseline-musl": "0.5.9",
31
- "@altimateai/altimate-code-linux-x64-baseline": "0.5.9",
32
- "@altimateai/altimate-code-linux-arm64": "0.5.9",
33
- "@altimateai/altimate-code-darwin-arm64": "0.5.9",
34
- "@altimateai/altimate-code-windows-x64-baseline": "0.5.9"
23
+ "@altimateai/altimate-code-linux-x64": "0.5.10",
24
+ "@altimateai/altimate-code-windows-arm64": "0.5.10",
25
+ "@altimateai/altimate-code-linux-arm64-musl": "0.5.10",
26
+ "@altimateai/altimate-code-darwin-x64": "0.5.10",
27
+ "@altimateai/altimate-code-windows-x64": "0.5.10",
28
+ "@altimateai/altimate-code-linux-x64-musl": "0.5.10",
29
+ "@altimateai/altimate-code-darwin-x64-baseline": "0.5.10",
30
+ "@altimateai/altimate-code-linux-x64-baseline-musl": "0.5.10",
31
+ "@altimateai/altimate-code-linux-x64-baseline": "0.5.10",
32
+ "@altimateai/altimate-code-linux-arm64": "0.5.10",
33
+ "@altimateai/altimate-code-darwin-arm64": "0.5.10",
34
+ "@altimateai/altimate-code-windows-x64-baseline": "0.5.10"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "pg": ">=8",
@@ -100,6 +100,8 @@ A single insight might just be one chart with a headline and annotation. Scale c
100
100
  - **Responsive**: `min-h-[VALUE]` on all charts. Grid stacks on mobile
101
101
  - **Animation**: Entry transitions only, `duration-300` to `duration-500`. Never continuous
102
102
  - **Accessibility**: `aria-label` on charts, WCAG AA contrast, don't rely on color alone
103
+ - **Dynamic color safety**: When colors come from external sources (brand palettes, category maps, API data, user config), never apply them directly as text color without a contrast check. Dark colors are invisible on dark card backgrounds. Safe pattern: use the external color only for non-text elements (left border, dot, underline); always use the standard text color (white / `var(--text)`) for the label itself. If color-coded text is required, apply a minimum lightness floor: `color: hsl(from brandColor h s max(l, 60%))`
104
+ - **Icon semantics**: Verify every icon matches its label's actual meaning, not just its visual shape. Common traps: using a rising-trend icon (📈) for metrics where lower is better (latency, error rate, cost); using achievement icons (🏆) for plain counts. When in doubt, use a neutral descriptive icon over a thematic one that could mislead
103
105
 
104
106
  ### Step 5: Interactivity & Annotations
105
107
 
@@ -133,3 +135,16 @@ A single insight might just be one chart with a headline and annotation. Scale c
133
135
  - Pie charts > 5 slices — use horizontal bar
134
136
  - Unlabeled dual y-axes — use two separate charts
135
137
  - Truncated bar axes — always start at zero
138
+ - Filtering or mapping over a field not confirmed to exist in the data export — an undefined field in `.filter()` or `.map()` produces empty arrays or NaN silently, not an error; always validate the exported schema matches what the chart code consumes
139
+
140
+ ## Pre-Delivery Checklist
141
+
142
+ Before marking a dashboard complete:
143
+
144
+ - [ ] Every tab / view activated — all charts render (no blank canvases, no unexpected 0–1 axes)
145
+ - [ ] Every field referenced in chart/filter code confirmed present in the data export
146
+ - [ ] All text readable on its background — check explicitly when colors come from external data
147
+ - [ ] All icons match their label's meaning
148
+ - [ ] Tooltips appear on hover for every chart
149
+ - [ ] No chart silently receives an empty dataset — add a visible empty state or console warning
150
+ - [ ] Mobile: grid stacks correctly, no body-level horizontal overflow
@@ -392,3 +392,70 @@ const CalloutLabel = ({ viewBox, label, color = "#1e293b" }: { viewBox?: { x: nu
392
392
  ```
393
393
 
394
394
  **Rules:** Never overlap data. Use `position: "insideTopRight"/"insideTopLeft"` on labels. Pair annotations with tooltips — annotation names the event, tooltip shows the value.
395
+
396
+ ---
397
+
398
+ ## Multi-Tab Dashboard — Lazy Chart Initialization
399
+
400
+ Charts initialized inside a hidden container (`display:none`) render blank. Chart.js, Recharts, and Nivo all read container dimensions at mount time — a hidden container measures as `0×0`.
401
+
402
+ **Rule: never initialize a chart until its container is visible.**
403
+
404
+ ```js
405
+ // Vanilla JS pattern
406
+ var _inited = {};
407
+
408
+ function activateTab(name) {
409
+ // 1. make the tab visible first
410
+ document.querySelectorAll('.tab').forEach(el => el.classList.remove('active'));
411
+ document.getElementById('tab-' + name).classList.add('active');
412
+ // 2. then initialize charts — only on first visit
413
+ if (!_inited[name]) {
414
+ _inited[name] = true;
415
+ initChartsFor(name);
416
+ }
417
+ }
418
+
419
+ activateTab('overview'); // init the default visible tab on page load
420
+ ```
421
+
422
+ Library-specific notes:
423
+ - **Chart.js**: canvas reads as `0×0` inside `display:none` — bars/lines never appear
424
+ - **Recharts `ResponsiveContainer`**: reads `clientWidth = 0` — chart collapses to nothing
425
+ - **Nivo `Responsive*`**: uses `ResizeObserver` via `useMeasure`/`useDimensions` in `@nivo/core` — initially measures `0×0` when hidden and skips rendering; re-measures and re-renders correctly when container becomes visible, but the initial blank frame can cause a flash
426
+ - **React conditional rendering**: prefer `visibility:hidden` + `position:absolute` over toggling `display:none` if you want charts to stay mounted and pre-rendered
427
+
428
+ ---
429
+
430
+ ## Programmatic Dashboard Generation — Data-Code Separation
431
+
432
+ When generating a standalone HTML dashboard from a script (Python, shell, etc.), never embed JSON data inside a template string that also contains JavaScript. Curly-brace collisions in f-strings / template literals cause silent JS parse failures that are hard to debug.
433
+
434
+ **Wrong** — data and JS logic share one f-string, every `{` in JS must be escaped as `{{`:
435
+
436
+ ```python
437
+ html = f"""
438
+ <script>
439
+ const data = {json.dumps(data)}; // fine
440
+ const fn = () => {{ return x; }} // must escape — easy to miss
441
+ const obj = {{ key: getValue() }}; // one missed escape = blank page
442
+ </script>
443
+ """
444
+ ```
445
+
446
+ **Right** — separate data from logic entirely:
447
+
448
+ ```python
449
+ # Step 1: write data to its own file — no template string needed
450
+ with open('data.js', 'w') as f:
451
+ f.write('const DATA = ' + json.dumps(data) + ';')
452
+
453
+ # Step 2: HTML loads both files; app.js is static and never needs escaping
454
+ ```
455
+
456
+ ```html
457
+ <script src="data.js"></script> <!-- generated, data only -->
458
+ <script src="app.js"></script> <!-- static, logic only -->
459
+ ```
460
+
461
+ Benefits: `app.js` is static and independently testable; `data.js` is regenerated without touching logic; no escaping required in either file.