Repository navigation
fix(pivot): -ErrorVariable holds only the error, -Tips refuses unknown ids, chart settings table - #156
Merged
Conversation
…n ids - Every exported command marks the caller's -ErrorVariable when it starts and cuts it back in a trap before it throws again, so the variable holds the error once instead of each step it took through the module. - -Tips takes only pivotkit-react's tip ids (case-insensitive, sent in pivotkit's spelling); a Build-Module test compares the list and the help with the installed pivotkit-react's TIP_IDS and NOTICE_IDS. - docs/pivot/views.md lists the chart settings in a table of their own. Fixes #154 Refs #153 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e end of its section - Say in the CHANGELOG and reports.md that a module error stops the call also with -ErrorAction SilentlyContinue or Ignore (before, the function ran on after its own throw); test it, including a pipeline. - Move the chart settings table to the end of the -View section, so the prose about copying and keeping views is not under its heading. - index.md: the help of -Tips lists the ids; an unknown id is refused. Refs #153 Refs #154 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ontinue The test runs in a pwsh process of its own: inside Pester's try every throw is terminating, so only a script without a try shows the old behaviour (the function ran on after its throw). Ignore joins the -ErrorVariable matrix. Refs #153 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eizedev
added a commit
that referenced
this pull request
Nov 22, 2026
Brings in #156 (-ErrorVariable, -Tips validation, chart settings table). - views.md: display takes 'both'; the chart table has combo, treemap and referenceLines.extremes. - CHANGELOG: main's Fixed entries go into 0.9.0. - $Script:TipIds has stackedTotal (pivotkit-react 0.9). - New-UDPivotReport -Uri: -ErrorVariable holds the error once, and -ErrorAction Stop throws it with its own id, as the module's other commands do. After the merge, Stop gave PipelineStopped there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR:
-ErrorVariablenow holds the error once,-Tipsrefuses ids pivotkit does not know, and the views page has a table of its own for the chart settings.Fixes #154
Refs #153
The first point of #153 (
--numbersand--flat-headerfor-Engine Node) is not in this pull request. Those flags come with pivotkit-cli 0.5.0, which is not on npm yet (npm has 0.4.0), and they are a new parameter. They belong with the pivotkit 0.9 update in #152.What changes
-ErrorVariable(#153)Invoke-UDPivotReportleft up to 11 records in-ErrorVariable: the .NET exception, each rethrow on the way, and the error.Get-UDPivotSourceleft 8, a missing command line 6.trapcuts the list back to the mark and throws the error again. The list then holds the error once, the same recordcatchgets, with its id,DataandTargetObject.-ErrorVariable +namekeeps what the caller had before.-ErrorAction SilentlyContinueorIgnore, a command used to go on after its ownthrow:Invoke-UDPivotReportwithout a command line still tried to run it, and aConvertFrom-UDPivotViewpipeline returned a result for a view it had refused. Now the error stops the command with every-ErrorAction, as it already did withContinueandStop. This is a change for a script that relied onSilentlyContinue; the CHANGELOG andreports.mdsay so.PivotServerUnreachable).$PSCmdlet.ThrowTerminatingErrorwould have changed it toPivotServerUnreachable,Invoke-UDPivotReportand left aCmdletInvocationExceptionin the list.docs/pivot/reports.mdsays so in its errors section.-Tips(#154)-Tipstakes On, Off or the ids of pivotkit-react'sTIP_IDS. Anything else is refused with the list of ids. A notice id such asfilterEmptyis refused too: notices always show.-Tips Valueswas passed as typed and ignored. It now reaches pivotkit asvalues.tests/powershell/Build-Module.Tests.ps1readsTIP_IDSandNOTICE_IDSfrom the installed pivotkit-react bundle (the package does not export them) and compares them with$Script:TipIdsand the help of-Tips. It runs in CI's pivot build job, the one job that installs the module's packages. The reader handles pivotkit-react 0.8 (ids derived fromTIPS) and 0.9 (literal lists); I ran it against both.Views page (#154)
docs/pivot/views.md:displayandcharthave a row each. The chart settings have their own table, one row per key, under "Chart settings" at the end of the-Viewsection.docs/pivot/index.md: the Tips row says that the help lists the ids and that an unknown id is refused.For #152
docs/pivot/views.mdand the CHANGELOG conflict. The 0.9 additions go into single cells of the new table:displaygets'both',typegetscomboandtreemap,referenceLinesgetsextremes.$Script:TipIdsthen lacksstackedTotal, so-Tips stackedTotalis refused. With pivotkit-react 0.9 the new test fails until feat(pivot): rows from a pivotkit-server for the signed-in person, pivotkit 0.9 #152 adds it. That is what the test is for.New-UDPivotReport -Uriwrites its error withWrite-Error, which the trap does not see. It can callReset-UDPivotErrorVariable -Mark $errorMarkbefore that, and the sentence "the last record is the error" inserver-rows.mdcan go.Tested
tests/powershell(301 passed, 7 skipped: real pivotkit, PSU instances). The new-ErrorVariableand-ErrorActiontests failed on the code before the fix.npm test.tests/browser/site.spec.mjsin Chromium.views.md,reports.mdand the CHANGELOG.Places checked:
docs/pivot/views.md,docs/pivot/reports.md,docs/pivot/index.md, the help of-Tips, the module CHANGELOG, AGENTS.md (no change needed),docs/site/examples.ps1(uses valid chart keys).🤖 Generated with Claude Code