refactor: Componentize docs indicator chart rendering#1981
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a new IndicatorChartPanel Vue component and registers it globally; updates IndicatorChart to accept an optional Possibly related PRs
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/indicators/StochRsi.md (1)
136-136:⚠️ Potential issue | 🟡 MinorFix typo in comment.
The comment contains a typo: "huba" should be "hub" and the text appears duplicated.
📝 Proposed fix
-// does not create 2nd internal huba separate internal RSI hub +// does not create a 2nd internal RSI hub🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/indicators/StochRsi.md` at line 136, Fix the duplicated/typo'd inline comment next to the ToStochRsiHub() call: replace the existing comment with a single, clear phrase such as "// does not create a 2nd internal hub" (ensure "hub" is spelled correctly and any duplicated text is removed) in the line containing ToStochRsiHub().
🧹 Nitpick comments (1)
docs/scripts/update-indicator-charts.mjs (1)
48-48: Remove redundant skip condition branch for clarity.
content.includes('IndicatorChartPanel')already impliescontent.includes('IndicatorChart'); simplifying this condition improves readability without behavior change.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/scripts/update-indicator-charts.mjs` at line 48, The conditional currently checks both content.includes('IndicatorChart') and content.includes('IndicatorChartPanel'); remove the redundant second branch and simplify the if to only check content.includes('IndicatorChart') so the condition remains correct and more readable. Update the check where the symbol content.includes('IndicatorChartPanel') appears (inside the if that also checks content.includes('IndicatorChart')) to remove that redundant clause and leave only content.includes('IndicatorChart').
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/.vitepress/lib/chart-data-provider.ts`:
- Around line 45-64: The readStorageCache function currently accesses
window.localStorage.getItem and removeItem directly and can throw in
restrictive/privacy browser modes; wrap all localStorage access in a try/catch
so any exceptions (e.g., SecurityError) result in removing/ignoring the cache
and returning null instead of bubbling the error; specifically, surround calls
to window.localStorage.getItem(cacheKey) and
window.localStorage.removeItem(cacheKey) plus the JSON.parse/Date.now validation
with a try/catch, ensure JSON.parse failures and storage access errors are
caught and lead to returning null (and attempting removeItem inside the try only
if safe), and keep the existing early return when typeof window === 'undefined'
in the readStorageCache function.
- Around line 80-93: The sliceData function mutates the passed ChartData (fields
candles and series), causing cached objects to be permanently shortened; change
sliceData to avoid in-place mutation by returning a new ChartData object: create
a new candles array using data.candles.slice(-maxBars) only when needed and map
series to new objects with data: s.data.slice(-maxBars) (preserve other series
properties), and copy any other top-level properties from the original data so
the cache remains unchanged and callers get a sliced copy instead of the
original.
In `@docs/.vitepress/lib/chart-time.ts`:
- Around line 54-79: The current resolveSeriesTime shares the timeIndexOffsets
Map across all mapping passes causing cross-series leakage; fix by turning the
resolver into a factory that creates a fresh offsets map per mapping pass:
implement a createResolveSeriesTime() that captures a new timeIndexOffsets Map
and returns the resolveSeriesTime(timestamp, index) closure (using existing
timeIndexLookup and indices logic), then replace the exported resolveSeriesTime
usage so callers invoke createResolveSeriesTime() at the start of each mapping
pass to get an isolated resolver; reference symbols: timeIndexOffsets,
resolveSeriesTime, createResolveSeriesTime, timeIndexLookup.
In `@docs/indicators/Slope.md`:
- Around line 11-12: Remove the duplicate IndicatorChartPanel: delete the second
occurrence of <IndicatorChartPanel indicator-key="Slope" /> so only one
IndicatorChartPanel with indicator-key="Slope" remains; locate the duplicate by
searching for the IndicatorChartPanel component with indicator-key="Slope" and
remove the extra instance to match other indicator pages and the single
Slope.json data file.
In `@docs/scripts/update-indicator-charts.mjs`:
- Line 62: The current replacement uses a single indicatorName for every image
(`replacement` variable) which causes distinct chart variants to be overwritten;
update the generator to compute a unique per-image key (e.g., derive an
identifier from the source image basename or append a per-match index) and use
that when constructing the `<IndicatorChartPanel indicator-key="...">` string
(replace the single-use `indicatorName` in `replacement` with a composed key
like `${indicatorName}-${imageBasename}` or `${indicatorName}-${index}` so each
replacement call produces a unique indicator-key).
---
Outside diff comments:
In `@docs/indicators/StochRsi.md`:
- Line 136: Fix the duplicated/typo'd inline comment next to the ToStochRsiHub()
call: replace the existing comment with a single, clear phrase such as "// does
not create a 2nd internal hub" (ensure "hub" is spelled correctly and any
duplicated text is removed) in the line containing ToStochRsiHub().
---
Nitpick comments:
In `@docs/scripts/update-indicator-charts.mjs`:
- Line 48: The conditional currently checks both
content.includes('IndicatorChart') and content.includes('IndicatorChartPanel');
remove the redundant second branch and simplify the if to only check
content.includes('IndicatorChart') so the condition remains correct and more
readable. Update the check where the symbol
content.includes('IndicatorChartPanel') appears (inside the if that also checks
content.includes('IndicatorChart')) to remove that redundant clause and leave
only content.includes('IndicatorChart').
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (85)
.markdownlint-cli2.jsoncdocs/.vitepress/components/IndicatorChart.vuedocs/.vitepress/components/IndicatorChartPanel.vuedocs/.vitepress/lib/chart-data-provider.tsdocs/.vitepress/lib/chart-time.tsdocs/.vitepress/lib/chart-types.tsdocs/.vitepress/theme/index.tsdocs/indicators/Adl.mddocs/indicators/Adx.mddocs/indicators/Alligator.mddocs/indicators/Alma.mddocs/indicators/Aroon.mddocs/indicators/Atr.mddocs/indicators/AtrStop.mddocs/indicators/Awesome.mddocs/indicators/Beta.mddocs/indicators/BollingerBands.mddocs/indicators/Bop.mddocs/indicators/Cci.mddocs/indicators/ChaikinOsc.mddocs/indicators/Chandelier.mddocs/indicators/Chop.mddocs/indicators/Cmf.mddocs/indicators/Cmo.mddocs/indicators/ConnorsRsi.mddocs/indicators/Correlation.mddocs/indicators/Dema.mddocs/indicators/Donchian.mddocs/indicators/Dpo.mddocs/indicators/Dynamic.mddocs/indicators/ElderRay.mddocs/indicators/Ema.mddocs/indicators/Epma.mddocs/indicators/Fcb.mddocs/indicators/FisherTransform.mddocs/indicators/ForceIndex.mddocs/indicators/Fractal.mddocs/indicators/HeikinAshi.mddocs/indicators/Hma.mddocs/indicators/HtTrendline.mddocs/indicators/Hurst.mddocs/indicators/Ichimoku.mddocs/indicators/Kama.mddocs/indicators/Keltner.mddocs/indicators/Kvo.mddocs/indicators/MaEnvelopes.mddocs/indicators/Macd.mddocs/indicators/Mama.mddocs/indicators/Mfi.mddocs/indicators/Obv.mddocs/indicators/ParabolicSar.mddocs/indicators/Pivots.mddocs/indicators/Pmo.mddocs/indicators/Prs.mddocs/indicators/Pvo.mddocs/indicators/Renko.mddocs/indicators/Roc.mddocs/indicators/RocWb.mddocs/indicators/RollingPivots.mddocs/indicators/Rsi.mddocs/indicators/Slope.mddocs/indicators/Sma.mddocs/indicators/Smi.mddocs/indicators/Smma.mddocs/indicators/StarcBands.mddocs/indicators/Stc.mddocs/indicators/StdDev.mddocs/indicators/StdDevChannels.mddocs/indicators/Stoch.mddocs/indicators/StochRsi.mddocs/indicators/SuperTrend.mddocs/indicators/T3.mddocs/indicators/Tema.mddocs/indicators/Trix.mddocs/indicators/Tsi.mddocs/indicators/UlcerIndex.mddocs/indicators/Ultimate.mddocs/indicators/VolatilityStop.mddocs/indicators/Vortex.mddocs/indicators/Vwap.mddocs/indicators/Vwma.mddocs/indicators/WilliamsR.mddocs/indicators/Wma.mddocs/indicators/ZigZag.mddocs/scripts/update-indicator-charts.mjs
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> Signed-off-by: Dave Skender <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
docs/.vitepress/lib/chart-data-provider.ts (1)
45-64:⚠️ Potential issue | 🟠 MajorGuard
localStorageaccess inreadStorageCacheto avoid runtime aborts in restricted browser modes.At Line [50],
getItemcan throw; Line [58] and Line [63]removeItemcalls can also throw. That can break loading before fallback logic runs.Suggested hardening
function readStorageCache(cacheKey: string): CachePayload | null { if (typeof window === 'undefined') { return null } - const raw = window.localStorage.getItem(cacheKey) + let raw: string | null = null + try { + raw = window.localStorage.getItem(cacheKey) + } catch { + return null + } if (!raw) { return null } try { const parsed = JSON.parse(raw) as CachePayload if (!parsed.expiresAt || !parsed.data || Date.now() > parsed.expiresAt) { - window.localStorage.removeItem(cacheKey) + try { window.localStorage.removeItem(cacheKey) } catch {} return null } return parsed } catch { - window.localStorage.removeItem(cacheKey) + try { window.localStorage.removeItem(cacheKey) } catch {} return null } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/.vitepress/lib/chart-data-provider.ts` around lines 45 - 64, The readStorageCache function currently assumes window.localStorage.getItem/removeItem won't throw; wrap all localStorage access inside a safe feature-detection try/catch (or a small helper e.g., isLocalStorageAvailable) so failures in getItem or removeItem return null instead of aborting; specifically, inside readStorageCache guard with typeof window !== 'undefined' then attempt getItem in a try/catch, handle JSON.parse errors as already done, and wrap any subsequent removeItem calls in try/catch (or short-circuit them) so thrown DOMExceptions are swallowed and the function returns null allowing fallback logic to proceed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/.vitepress/lib/chart-data-provider.ts`:
- Around line 100-102: The getChartData function currently reads options.maxBars
directly, which allows 0, negative, non-integer values to break slice()
behavior; normalize options.maxBars before using it: compute a normalizedMaxBars
by checking Number.isFinite(options.maxBars) and options.maxBars > 0, then set
normalizedMaxBars = Math.floor(options.maxBars) when valid, otherwise fall back
to the default 100; replace uses of maxBars (or the prior variable) with
normalizedMaxBars when slicing/truncating the dataset in getChartData to ensure
correct, positive integer behavior.
---
Duplicate comments:
In `@docs/.vitepress/lib/chart-data-provider.ts`:
- Around line 45-64: The readStorageCache function currently assumes
window.localStorage.getItem/removeItem won't throw; wrap all localStorage access
inside a safe feature-detection try/catch (or a small helper e.g.,
isLocalStorageAvailable) so failures in getItem or removeItem return null
instead of aborting; specifically, inside readStorageCache guard with typeof
window !== 'undefined' then attempt getItem in a try/catch, handle JSON.parse
errors as already done, and wrap any subsequent removeItem calls in try/catch
(or short-circuit them) so thrown DOMExceptions are swallowed and the function
returns null allowing fallback logic to proceed.
Signed-off-by: Dave Skender <[email protected]>
…omponent-for-docs-website Signed-off-by: Dave Skender <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/.vitepress/components/IndicatorChart.vue (1)
454-590:⚠️ Potential issue | 🟠 MajorPrevent stale async
initChart()runs from overwriting newer renders.With reloads now triggered by both
srcandindicatorKey, overlapping async inits can race; a slower earlier run can apply stale chart/state after a newer reload starts.🔧 Suggested guard (generation token) to ignore stale runs
let resizeObserver: ResizeObserver | null = null let resizeTimeout: ReturnType<typeof setTimeout> | null = null +let initGeneration = 0 async function initChart() { + const generation = ++initGeneration isLoading.value = true hasError.value = false const data = await loadChartData() + if (generation !== initGeneration) return if (!data) { isLoading.value = false return } // ... await new Promise(resolve => requestAnimationFrame(resolve)) await new Promise(resolve => requestAnimationFrame(resolve)) + if (generation !== initGeneration) return // continue chart creation only if still current generation } function destroyChart() { + initGeneration++ if (resizeTimeout) { clearTimeout(resizeTimeout) resizeTimeout = null } // ... }Also applies to: 630-633
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/.vitepress/components/IndicatorChart.vue` around lines 454 - 590, Add a generation token to guard initChart: increment a shared numeric token (e.g., initGeneration) at the start of initChart, capture it into a local const (e.g., currentGeneration) and after every await (especially after loadChartData, the double requestAnimationFrame waits, the container-width polling loop, and before each section that mutates state or creates charts/resizeObserver) check that currentGeneration === initGeneration and return early if it differs; ensure you perform no DOM/chart mutations when stale and only call overlayChart/oscillatorChart creation, setupIndicatorSeries/setupCandlestickSeries/setupVolumeSeries, series.setData, and resizeObserver.observe when the token still matches; apply the same generation-guard pattern to the other async reload path that also runs on src/indicatorKey changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.vscode/tasks.json:
- Line 760: Remove the unconditional "|| true" that forces success from the
Windows stop command containing "Stop-Process -Name Test.Simulation -Force
-ErrorAction SilentlyContinue" so the shell exit code can drive the conditional;
then update the other Windows stop command variant (the similar PowerShell
command further down) so it uses an OR fallback that prints the "[INFO] No
Simulation server processes found" message only when the Stop-Process call fails
(i.e., replace the current unconditional success pattern with a proper "&& echo
'[OK] ...' || echo '[INFO] ...'" flow).
- Line 431: The Test: Integration task currently appends " ; powershell.exe ...
|| true" which forces success; instead run the dotnet test commands, capture
their exit code into a variable, perform the cleanup (Stop-Process -Name
Test.SseServer -Force -ErrorAction SilentlyContinue) and then exit/passthrough
with the original test exit code so failures propagate to CI. Locate the task
command string that contains "dotnet test
tests/integration/Tests.Integration.csproj ... && dotnet test
tests/public-api/Tests.PublicApi.csproj ...; powershell.exe" and replace the
trailing `|| true` with logic that saves the tests' exit code and uses that code
as the final process exit after running the PowerShell cleanup.
---
Outside diff comments:
In `@docs/.vitepress/components/IndicatorChart.vue`:
- Around line 454-590: Add a generation token to guard initChart: increment a
shared numeric token (e.g., initGeneration) at the start of initChart, capture
it into a local const (e.g., currentGeneration) and after every await
(especially after loadChartData, the double requestAnimationFrame waits, the
container-width polling loop, and before each section that mutates state or
creates charts/resizeObserver) check that currentGeneration === initGeneration
and return early if it differs; ensure you perform no DOM/chart mutations when
stale and only call overlayChart/oscillatorChart creation,
setupIndicatorSeries/setupCandlestickSeries/setupVolumeSeries, series.setData,
and resizeObserver.observe when the token still matches; apply the same
generation-guard pattern to the other async reload path that also runs on
src/indicatorKey changes.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.markdownlint-cli2.jsonc.vscode/tasks.jsondocs/.vitepress/components/IndicatorChart.vuedocs/indicators/T3.md
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/indicators/T3.md
Signed-off-by: Dave Skender <[email protected]>
Signed-off-by: Dave Skender <[email protected]>
Signed-off-by: Dave Skender <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 4
♻️ Duplicate comments (1)
docs/.vitepress/lib/chart-data-provider.ts (1)
100-102:⚠️ Potential issue | 🟡 MinorNormalize
maxBarsbefore slicing.
Line [101]still accepts0, negative,NaN, and fractional values; this leads to unexpectedslice()output. Please coerce to a finite positive integer with a safe default.Proposed fix
export async function getChartData(options: ChartProviderOptions): Promise<ChartData> { - const maxBars = options.maxBars ?? 100 + const requestedBars = options.maxBars + const maxBars = + typeof requestedBars === 'number' && + Number.isFinite(requestedBars) && + requestedBars > 0 + ? Math.floor(requestedBars) + : 100 const cacheKey = getCacheKey(options.indicatorKey)#!/bin/bash # Verify current maxBars handling and whether normalization exists. rg -n "const maxBars = options.maxBars|Number\\.isFinite\\(|Math\\.floor\\(" docs/.vitepress/lib/chart-data-provider.ts -C2🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/.vitepress/lib/chart-data-provider.ts` around lines 100 - 102, Normalize options.maxBars at the top of getChartData: coerce options.maxBars into a finite positive integer before using it for slicing (replace the current const maxBars = options.maxBars ?? 100). Use Number.isFinite to detect non-finite values, fall back to the safe default (100), and apply Math.floor and Math.max to ensure a positive integer (at least 1) so slice() receives a valid count; update any downstream uses of maxBars (e.g., where slice(...) is called) to rely on this normalized value.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/.markdownlint-cli2.jsonc`:
- Line 13: Re-enable MD033 by removing the global "MD033": false setting and
instead add an explicit allow-list under MD033.allowed_elements that includes
only the required VitePress/custom tags (e.g., "IndicatorChartPanel", "style",
"span", "h2", "h3" or any other specific tags used by the docs); update
docs/.markdownlint-cli2.jsonc to restore MD033 to true (or remove the false
entry) and add MD033.allowed_elements with the narrow set of permitted elements
so inline HTML remains blocked except for those approved tags.
In `@docs/.vitepress/components/IndicatorChart.vue`:
- Around line 632-635: Concurrent invocations of initChart (triggered by the
watchers) can interleave because initChart awaits loadChartData,
requestAnimationFrame and a polling loop, allowing stale runs to overwrite newer
state when globals are assigned; fix this by adding a run token (e.g.,
chartRunId) that is incremented in destroyChart and captured at the start of
initChart, then validate the captured token after each await point (before
assigning any global chart objects or completing render steps) and bail out if
it no longer matches so only the most recent initChart run proceeds to update
shared state (reference functions: destroyChart, initChart, loadChartData and
the polling loop).
In `@docs/.vitepress/lib/chart-data-provider.ts`:
- Around line 92-97: fetchJson currently awaits fetch(url) with no timeout, so
stalled requests never reject and prevent the fallback; add an AbortController
inside fetchJson, pass controller.signal to fetch(url, { signal }), start a
setTimeout that calls controller.abort() after ~8000ms, and clear that timeout
once fetch completes successfully; ensure the aborted fetch results in a thrown
error so the existing try/catch/fallback logic can run (clean up the timer in
both success and error paths).
In `@docs/indicators/StochRsi.md`:
- Around line 134-136: The example declares the same local variable name twice
(var stochRsiHub) causing a duplicate declaration error; update the second
declaration (the one assigning rsiHub.ToStochRsiHub()) by either removing the
var to reassign the existing stochRsiHub or renaming it (e.g., stochRsiHub2) so
it no longer conflicts with the earlier stochRsiHub declaration; locate the
second occurrence by the rsiHub and ToStochRsiHub() symbols and make the rename
or reassign change accordingly.
---
Duplicate comments:
In `@docs/.vitepress/lib/chart-data-provider.ts`:
- Around line 100-102: Normalize options.maxBars at the top of getChartData:
coerce options.maxBars into a finite positive integer before using it for
slicing (replace the current const maxBars = options.maxBars ?? 100). Use
Number.isFinite to detect non-finite values, fall back to the safe default
(100), and apply Math.floor and Math.max to ensure a positive integer (at least
1) so slice() receives a valid count; update any downstream uses of maxBars
(e.g., where slice(...) is called) to rely on this normalized value.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
.vscode/tasks.jsondocs/.markdownlint-cli2.jsoncdocs/.vitepress/components/IndicatorChart.vuedocs/.vitepress/lib/chart-data-provider.tsdocs/.vitepress/lib/chart-time.tsdocs/.vitepress/lib/chart-types.tsdocs/indicators/Slope.mddocs/indicators/StochRsi.mdtests/indicators/Tests.Indicators.csprojtools/simulate/Test.Simulation.csproj
✅ Files skipped from review due to trivial changes (1)
- tools/simulate/Test.Simulation.csproj
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/.vitepress/lib/chart-time.ts
Signed-off-by: Dave Skender <[email protected]>
Signed-off-by: Dave Skender <[email protected]>
Signed-off-by: Dave Skender <[email protected]>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/.vitepress/components/IndicatorChart.vue (1)
17-17: Remove unused importparseTimestamp.
parseTimestampis imported but not used anywhere in this component.🧹 Proposed fix
-import { createTimeContext, parseTimestamp } from '../lib/chart-time' +import { createTimeContext } from '../lib/chart-time'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/.vitepress/components/IndicatorChart.vue` at line 17, The import statement in IndicatorChart.vue includes an unused symbol parseTimestamp; remove parseTimestamp from the import so only createTimeContext is imported (i.e., change the import from "{ createTimeContext, parseTimestamp }" to just "{ createTimeContext }") to eliminate the unused import warning and keep imports minimal.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docs/.vitepress/components/IndicatorChart.vue`:
- Line 17: The import statement in IndicatorChart.vue includes an unused symbol
parseTimestamp; remove parseTimestamp from the import so only createTimeContext
is imported (i.e., change the import from "{ createTimeContext, parseTimestamp
}" to just "{ createTimeContext }") to eliminate the unused import warning and
keep imports minimal.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
.vscode/tasks.jsondocs/.markdownlint-cli2.jsoncdocs/.vitepress/components/IndicatorChart.vuedocs/.vitepress/lib/chart-data-provider.tsdocs/indicators/StochRsi.md
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/indicators/StochRsi.md
|
@CodeRabbit resolve or renew any old feedback items if they are still valid |
Signed-off-by: Dave Skender <[email protected]>
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain
🏁 Script executed: Length of output: 33224 I'll check the current state of the code to see which feedback items are still valid. 🏁 Script executed: Length of output: 3608 Let me check a few more items that were mentioned in the reviews: 🏁 Script executed: Length of output: 1481
✅ Resolved Issues (can be marked as addressed):
|
Signed-off-by: Dave Skender <[email protected]>
Motivation
Description
docs/.vitepress/lib:chart-types.ts,chart-time.ts, andchart-data-provider.tswith support forVITE_CHART_DATA_BASE_URL, local/data/<indicator>.jsonfallback, in-memory +localStoragecaching and TTL viaVITE_CHART_CACHE_TTL_MS.IndicatorChart.vueto consumegetChartData(...)andcreateTimeContext(...), accept an optionalindicatorKeyprop, and watch bothsrcandindicatorKeyfor reloads, removing inline type/logic duplication.IndicatorChartPanel.vueand register it in the VitePress theme (docs/.vitepress/theme/index.ts) to standardize embeds.ClientOnly+IndicatorChartblocks acrossdocs/indicators/*.mdwith<IndicatorChartPanel indicator-key="..." />and update the migration scriptdocs/scripts/update-indicator-charts.mjsto emit the new tag..markdownlint-cli2.jsoncto include the new custom component tag names.Testing
pnpm installindocs/successfully to restore dependencies.pnpm run docs:buildsuccessfully, and ranvitepress previewto serve the site; a Playwright script visited/indicators/Rsiand captured a screenshot confirming the panel renders.MD033(inline HTML) for the new component usages, the.markdownlint-cli2.jsoncallow-list was updated and committed, but depending on the exact CLI invocation some lint runs still reportedMD033(investigation: CLI invocation scope/args may need alignment).Codex Task