Repository navigation
feat(pivot): rows from a pivotkit-server for the signed-in person, pivotkit 0.9 - #152
Merged
Merged
Conversation
…votkit 0.9 New-UDPivotReport -Uri -Source -Token fetches a source's rows from pivotkit-server's rows route with the person's token and hands the answer to the report as JSON text. Link parameters come from the page's query string, filtered by the source's linkParams. Server answers map to typed errors; the reader gets a plain message, the operator a warning. Also: Get-UDPivotSource lists records, linkParams, views, rows and dataAsOf; pivotkit 0.9's chart types combo and treemap and referenceLines.extremes; theme properties for --pk-chart-axis and --pk-chart-other; docs for sizing, DOTNET_GCHeapHardLimit and the module's own network requests. Fixes #144 Fixes #146 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- read an error answer of the rows route with a cap and a time limit - an empty token asks the reader to sign in and names SaveTokens in the log - 403 INSUFFICIENT_SCOPE tells the reader the service is not set up - the operator's message always goes to the warning stream - leave out parameters without a value; say when an answer is no JSON - -MaxBytes at most 64 MB, -Params as an alias of -Parameter - the slice "Other (n)" keeps pivotkit's grey in the dark theme - a page of its own for the server rows, with the server's limits, what leaves the server and a config example; the errors table lists the rows route's ids Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the slice "Other (n)" follows the muted text again in the light theme - error bodies cut by the cap leave no record in $Error - the empty-token check reuses the token conversion for the rest - reports.md: the -Scope advice applies to client credentials only - server-rows.md: how to choose DOTNET_GCHeapHardLimit, -Params, concurrency below compute.workers; index links the new page - CHANGELOG names the 64 MB cap, -Params and the new reader messages Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ConvertFrom-UDPivotView, view files, -Templates and the template stores keep fieldLabels, display "both", sort[].column and conditional.colors. - -OnCellClick docs: a chart point runs it at Show the rows or a double click. - Docs for the Both tab, Name, colour scale presets, sort by one column, grouping in Filters, the stackedTotal tip and touch targets. - A Playwright test for the chart point menu on PSU. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- An empty fieldLabels passes; an empty or blank name is refused. - A showcase view file with fieldLabels, both, a colour preset and a sort by one column, and a Playwright test that opens it on PSU. - Docs: -NoDrillDown with the chart point menu, pie and treemap clicks, fieldLabels over -FieldDefaults labels, the colour scale row names, bundle size; CHANGELOG notes for older module versions and display case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The colour scale rows by their names on screen, the label length after trimming as pivotkit counts it, and the CHANGELOG on older modules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pins of pivotkit's release: core 0.9.0, react 0.9.0, report 0.5.0, xlsx 0.6.0. The docs name pivotkit-server 0.4.0 and pivotkit-cli 0.5.0. ModuleVersion 0.9.0. The lock file follows once npm has them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
…de engine pivotkit-cli 0.5.0's --numbers and --flat-header: CSV and JSON numbers rounded to the decimals the view shows, and one CSV header row. Refused for other formats and for -Engine Rest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lock file takes pivotkit-core 0.9.0, pivotkit-react 0.9.0, pivotkit-report 0.5.0 and pivotkit-xlsx 0.6.0 as published on npm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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: the Pivot module's part of pivotkit 0.9. A page shows a pivotkit-server source for the signed-in person, also from a
create_linklink with parameters. Draft until pivotkit 0.9 is on npm.TODO before merge: refresh the lock file once pivotkit 0.9 is on npm. The committed
package.jsonpins pivotkit's release (eizedev/pivotkit#704): pivotkit-core 0.9.0, pivotkit-react 0.9.0, pivotkit-report 0.5.0 and pivotkit-xlsx 0.6.0. The lock file still holds the 0.8 versions, sonpm cifails in CI until then. I built and tested against tarballs packed from pivotkit's main at f8205ed8, installed locally only.ModuleVersionis 0.9.0 and the CHANGELOG heading0.9.0 - 2026-11-21.Fixes #144
Fixes #146
Fixes #153
What changes
Rows from a server (#144)
New-UDPivotReport -Uri -Source -Tokenfetches the rows fromPOST /sources/recordswith the person's token ($AccessToken).recordsprop). PowerShell never turns it into objects. The report parses it and hands pivotkit-react the columnar data.$Query(or-Query), filtered by the source'slinkParamsfromGET /sources.-Parameterreplaces them. The issue calls it-Params; I kept the nameInvoke-UDPivotReportuses and added-Paramsas an alias.-View <name>sends a named view to the server.-MaxBytes(default 32 MB, at most 64 MB) caps the answer. It is read in pieces; a cut-off answer is an error, never part of the rows. Error answers are read with a cap and a time limit too.PivotRowsNotAllowed,PivotNoDataandPivotServerBusyare new, for the rows route only. A 400 shows the reader "this link does not fit", a 403INSUFFICIENT_SCOPE"not set up for your sign-in". A page without a token asks the reader to sign in and namesSaveTokensin the log.-ErrorActionor-ErrorVariableget the error record as well;-ErrorAction Stopthrows.withheld) says which field above the report.Get-UDPivotSourceaddsRecords,LinkParams,Views,RowsandDataAsOf.docs/pivot/server-rows.md: setup on PSU and pivotkit-server with the server's limits, what leaves the server, links, errors, what stays on the PSU server, sizing withDOTNET_GCHeapHardLimit. The issue asked for this inreports.md; that page is about files without a browser, so the new page sits next to it andreports.mdlinks it from its errors section.Network requests (#146)
docs/pivot/events.mdlinks pivotkit'ssecurity.md#networkand lists the module's own requests.pivotkit 0.9
comboandtreemapin views and inInvoke-UDPivotReport -Layout(one list of chart types now).chart.referenceLines.extremespasses through views and view files.--pk-chart-axisand--pk-chart-othermap to--psu-pivot-chart-axis(falls back to--psu-chart-axis) and--psu-pivot-chart-other(falls back to the muted text).ConvertFrom-UDPivotView, view files,-Templatesand the template stores:fieldLabels(Rename a field in Rows, Columns or Filters for the table, chart and export pivotkit#158),display = 'both'(Charts: table and chart together pivotkit#51),sort[].column(Sort rows by the values of one column, and column fields by clicking their name pivotkit#70) and a colour scale'sconditional.colors(Highlight: choose the colour scale (blue to red, red to green, light to dark) pivotkit#95). An emptyfieldLabelspasses; a blank name is refused.displayis lower case only, as pivotkit writes it.-OnCellClickfor a chart point runs at Show the rows or a double click. The event docs, the help of-OnCellClickand-NoDrillDownsay so, and that a pie slice or a treemap tile never runs it. A Playwright test clicks a bar on PSU.stackedTotal(Charts: a tip when bars are stacked over a value that does not add up pivotkit#536) and the 44 px touch targets (Phone and touch: 44 px targets for every control, view name row, wrapping and touch wording pivotkit#72).dist/index.jsloads the German texts and the tips statically, and the module's webpack build merges every chunk into its one bundle. On both test instances a German and an English report rendered in their language from the first frame, with tips, and the page loaded no new file. The instances send no Content-Security-Policy header, so this checks "no new request", not a CSP.strictandPivotView(core/element: a strict computePivot, and one name for the view type pivotkit#563) need no change: the module neither callscomputePivotnor uses pivotkit's types.-Labels: no key of pivotkit-react 0.8.1's labels is gone; the keys the docs name still exist.display = 'both'and dropsfieldLabels, so every PSU server that shares a template store needs this version first.Merge of main (#156) and #153
-ErrorVariableholds only the error,-Tipsrefuses unknown ids, a table of the chart settings. The views page's table has'both',combo,treemapandextremes;-TipsknowsstackedTotal.New-UDPivotReport -Uri:-ErrorVariableholds the error once.-ErrorAction Stopthrows it with its own id, as the module's other commands do; after the merge it gavePipelineStopped. The tests expect the plain id there now.Invoke-UDPivotReport -Engine Node -Numbers Full|Shownand-FlatHeader: pivotkit-cli 0.5.0's--numbersand--flat-header, refused for other formats and for-Engine Rest. Checked with the real pivotkit-cli 0.5.0 from pivotkit's main."Done when" of #144
create_linklink with a parameter: on both test instances, with a test issuer's token instead of$AccessToken(see "Tested").tests/browser/psu-pivot-rows.spec.mjs, run by hand on both instances (it needs a PSU instance and a server, so CI skips it).-Data: measured below, except-Dataat 100,000 rows.DOTNET_GCHeapHardLimit.SaveTokens,rest.audience, the scope, where the token works, what stays on PSU.Memory measurement
Both PSU test instances (2026.2.5 and 2026.3.4, containers with a 2 GiB limit), an app in a PowerShell 7 environment, so the page's host process and PSU's server process are apart. pivotkit-server from pivotkit main next to PSU on loopback, 20 columns, 3 page loads per row. Growth of RSS at the peak, sampled every 0.25 s. The rows of the server ran one after another in the same host process;
-Data(Import-Csvobjects) in a new one.-Data-Data-Dataat 100,000 rows was not measured: it risked an out-of-memory kill of a shared test instance.Tested
the built module carries pivotkit-core's view-file and view schemas of the version the bundle uses: it compares the installed pivotkit-core with the lock file and passes once the lock file is refreshed.npm test: 153 passed (with a test per reader message kind).site.spec.mjs29 passed (the new "Bars and lines" test failed with the 0.8 bundle, which drew bars and droppedcomboandextremes). The newpsu-pivot-rows.spec.mjs3 passed on both instances (on the server rows commits; not run again on the last build).psu-pivot.spec.mjs36 passed on both instances (4 skipped: the sign-in role tests), with two new tests. The view file test failed before the file was on the instance.psu-pivot-demo.spec.mjs4 passed on both.create_linklink with?customer=acme, the withheld-field notice, every reader message in light and dark at 390 px.The person's token in these tests was a token of a test issuer that pivotkit-server trusts (
auth.externalIssuers). PSU's own OpenID Connect sign-in with$AccessTokenis not set up on the test instances, so that path is not tested end to end yet.Reviews
An independent general review and an operator/developer role review ran on the local commit before the push, and a follow-up review on the fixes. The second commit holds the fixes.
For the pivotkit 0.9 part, an independent general, operator and developer review ran on the local commit, and a follow-up review on its fixes. The commits after
feat(pivot): pivotkit 0.9's view keyshold the fixes.Places checked
docs/pivot/server-rows.md(new, in the navigation),reports.md,events.md,views.md,index.md,themes.md,docs/site/examples.ps1, the module CHANGELOG,AGENTS.md, the help ofNew-UDPivotReport,Get-UDPivotSourceandInvoke-UDPivotReport. The module README stays as it is. The Demo module needs no new minimum version.🤖 Generated with Claude Code