@altimateai/altimate-code 0.5.9 → 0.5.11
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 +32 -1
- package/package.json +13 -13
- package/skills/data-viz/SKILL.md +15 -0
- package/skills/data-viz/references/component-guide.md +67 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,37 @@ 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.11] - 2026-03-25
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **README changelog gap** — updated README to reflect releases v0.5.1 through v0.5.11; previous README only listed up to v0.5.0
|
|
13
|
+
- **npm publish transient 404s** — added retry logic (3 attempts with backoff) to `publish.ts` for concurrent scoped package publishes that hit npm registry race conditions
|
|
14
|
+
|
|
15
|
+
## [0.5.10] - 2026-03-24
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- **`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)
|
|
20
|
+
- **Data-viz skill improvements** — lazy initialization, data-code separation, color contrast rules, icon semantics, field validation, and pre-delivery checklist (#434)
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- **Snowflake Cortex not visible before authentication** — provider now appears in the provider list even when not yet authenticated (#447)
|
|
25
|
+
- **New user detection race condition** — first-run welcome flow and telemetry events could fire out of order or be skipped entirely (#445)
|
|
26
|
+
- **52 CI test failures from `mock.module` leaking across files** — test isolation fix for the new `check` command e2e tests (#460)
|
|
27
|
+
- **Missing `altimate_change` marker** — added required upstream marker on `isStatelessCommand` guard to pass Marker Guard CI (#457)
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- **Rename Recap back to Trace** — reverted the Recap branding to Trace across 29 files for better AI model comprehension of session recording concepts (#443)
|
|
32
|
+
|
|
33
|
+
### Testing
|
|
34
|
+
|
|
35
|
+
- 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)
|
|
36
|
+
- `altimate-code check` unit + e2e test suites (1,687 lines) (#453)
|
|
37
|
+
- Snowflake Cortex provider visibility tests (#447)
|
|
38
|
+
|
|
8
39
|
## [0.5.9] - 2026-03-23
|
|
9
40
|
|
|
10
41
|
### Fixed
|
|
@@ -32,7 +63,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
32
63
|
|
|
33
64
|
### Added
|
|
34
65
|
|
|
35
|
-
- **
|
|
66
|
+
- **Trace (session recording)** — session trace with loop detection and enhanced viewer (#381)
|
|
36
67
|
- **ESM bundling regression tests** — 9 e2e tests verifying Node can load `altimate-dbt` via symlink, wrapper, and direct invocation paths
|
|
37
68
|
|
|
38
69
|
### Testing
|
package/package.json
CHANGED
|
@@ -7,24 +7,24 @@
|
|
|
7
7
|
"scripts": {
|
|
8
8
|
"postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.5.
|
|
10
|
+
"version": "0.5.11",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@altimateai/altimate-core": "^0.2.5"
|
|
14
14
|
},
|
|
15
15
|
"optionalDependencies": {
|
|
16
|
-
"@altimateai/altimate-code-linux-
|
|
17
|
-
"@altimateai/altimate-code-windows-
|
|
18
|
-
"@altimateai/altimate-code-
|
|
19
|
-
"@altimateai/altimate-code-darwin-x64": "0.5.
|
|
20
|
-
"@altimateai/altimate-code-windows-
|
|
21
|
-
"@altimateai/altimate-code-linux-x64-
|
|
22
|
-
"@altimateai/altimate-code-
|
|
23
|
-
"@altimateai/altimate-code-linux-x64-
|
|
24
|
-
"@altimateai/altimate-code-linux-x64
|
|
25
|
-
"@altimateai/altimate-code-
|
|
26
|
-
"@altimateai/altimate-code-
|
|
27
|
-
"@altimateai/altimate-code-
|
|
16
|
+
"@altimateai/altimate-code-linux-arm64": "0.5.11",
|
|
17
|
+
"@altimateai/altimate-code-windows-x64": "0.5.11",
|
|
18
|
+
"@altimateai/altimate-code-windows-x64-baseline": "0.5.11",
|
|
19
|
+
"@altimateai/altimate-code-darwin-x64": "0.5.11",
|
|
20
|
+
"@altimateai/altimate-code-windows-arm64": "0.5.11",
|
|
21
|
+
"@altimateai/altimate-code-linux-x64-baseline": "0.5.11",
|
|
22
|
+
"@altimateai/altimate-code-linux-arm64-musl": "0.5.11",
|
|
23
|
+
"@altimateai/altimate-code-linux-x64-musl": "0.5.11",
|
|
24
|
+
"@altimateai/altimate-code-linux-x64": "0.5.11",
|
|
25
|
+
"@altimateai/altimate-code-darwin-x64-baseline": "0.5.11",
|
|
26
|
+
"@altimateai/altimate-code-linux-x64-baseline-musl": "0.5.11",
|
|
27
|
+
"@altimateai/altimate-code-darwin-arm64": "0.5.11"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"pg": ">=8",
|
package/skills/data-viz/SKILL.md
CHANGED
|
@@ -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.
|