Skip to content

Add 6 new pattern pages#25

Merged
kyleamueller merged 14 commits intomainfrom
claude/sharp-albattani
Mar 9, 2026
Merged

Add 6 new pattern pages#25
kyleamueller merged 14 commits intomainfrom
claude/sharp-albattani

Conversation

@kyleamueller
Copy link
Owner

Summary

Expands the patterns library from 12 → 18 pages, targeting the most common M questions from both human developers and LLM queries via the MCP endpoint.

New patterns:

  • table-joins — NestedJoin + ExpandTableColumn, all JoinKinds, anti-join, multi-column join, Table.Buffer performance tip
  • pivot-unpivot — Table.Unpivot, Table.UnpivotOtherColumns, critical null-drop gotcha with sentinel pattern, Table.Pivot with aggregation
  • nested-json-xml — expanding nested records/lists across multiple levels, inconsistent schema handling, XML navigation, expand function decision guide
  • null-safe-operations?? operator, null-safe arithmetic/text/records, filtering nulls, null vs missing field distinction, Table.FillDown
  • query-performance — query folding gotchas, Table.Buffer and List.Buffer usage, step consolidation, AddColumn type arg, avoiding re-evaluation
  • custom-function-reuse — inline vs standalone function queries, calling across queries, optional params, recursion warning, full fxCleanText example

Test plan

  • All 41 tests pass (typecheck + vitest) ✅
  • /patterns page shows 18 patterns
  • MCP list_patterns returns all 18; get_pattern works for each new slug

🤖 Generated with Claude Code

kyleamueller and others added 14 commits March 8, 2026 15:17
… example

- Replace hardcoded "161 functions" in homepage CTA with allFunctions.length
- Remove hardcoded function/category counts from metadata description
- Add CopyCodeBlock client component for the usage example code block
- Update usage-example-block CSS to support header+pre layout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Shows a Copy button on the toggle row itself so users can copy the
Table.FromRecords M code without needing to expand the section first.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The .copy-btn class had opacity:0 set globally (for SyntaxBlock hover reveal),
making all SampleTableCode copy buttons invisible since they weren't inside a
.syntax-block. Fix: use new .code-copy-btn class with SVG clipboard/check icons
matching the SyntaxBlock style, positioned absolutely in .sample-code-pre-wrapper.

Also updates CopyCodeBlock to use the same icon approach.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Install vitest, @vitest/coverage-v8, vite-tsconfig-paths, simple-git-hooks
- Add vitest.config.ts with tsconfigPaths for @/ alias resolution
- Export parseExamples/parseRemarks from route.ts for testability; fix description regex to skip leading blank line
- Add 4 test files: content-integrity, mdx, search, parsers (40 tests total)
- Add .github/workflows/test.yml for CI on push/PR to main
- Add 15 missing function pages discovered by content-integrity tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Audited all pages against the official Microsoft Power Query M function
reference and created pages for every missing function. Total coverage
grows from 177 to 507 function pages.

Categories added:
- List: 50 new pages (List.Reverse, List.Zip, List.Union, Date/Time
  sequence generators, set operations, statistics, etc.)
- Table: 55 new pages (Table.Column, Table.Transpose, Table.FuzzyJoin,
  Table.SplitColumn, membership/ordering/row-operation functions, etc.)
- Text: 23 new pages (Text.Start/End/Middle, delimiters, padding, etc.)
- Character, Guid, Lines, Splitter, Combiner, Comparer, URI: 15 new pages
- Date: 45 new pages (all Date.IsIn* filter functions, week/quarter/day
  helpers, format/parse functions)
- DateTime: 20 new pages (DateTime.IsIn* functions, AddZone, FromText, etc.)
- DateTimeZone: 11 new pages
- Duration: 5 new pages
- Time: 4 new pages
- Number: 42 new pages (trig, bitwise, type conversions, log/exp, etc.)
- Record: 9 new pages
- Type: 18 new pages
- Value: 9 new pages
- Accessing Data: 24 new pages (Sql, SharePoint, Folder, OData, PDF,
  Web.Page, MySQL, PostgreSQL, Oracle, Azure Storage, ODBC, etc.)

All 40 tests continue to pass (content-integrity, parsers, mdx, search).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add 7 function pages for M literal constructors: #table, #date,
  #datetime, #datetimezone, #duration, #time, #binary
- Add concepts/literal-constructors.mdx explaining all #-prefixed
  constructors with examples and common pitfalls
- Add spec validation test: every function slug must exist in the
  official Power Query M spec (fixture: official-spec-slugs.json)
- Remove two non-existent function pages (table-columntypes,
  table-removeduplicates) caught by the new spec test; fix cross-
  references in table-buffer, table-distinct, table-isdistinct,
  table-columncount, table-columnsoftype, table-schema

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Keep spec validation test additions; re-delete table-columntypes.mdx
(not in official spec) which was re-introduced by PR #21.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rewrote ## Remarks and ## Examples sections across all bulk-created
pages from PR #21. Frontmatter unchanged throughout.

- Date/DateTime/DateTimeZone/Duration/Time (72 pages): culture param
  guidance, cloud/UTC warnings for IsInCurrent* functions, Day.* enum
  usage for week functions, FILETIME origin, FixedLocalNow vs LocalNow
- List (49 pages): List.Buffer O(n²) gotcha with List.Contains,
  List.FirstN/LastN condition-mode behavior, statistical edge cases
  (List.StandardDeviation n=1, PercentileMode options), List.Random
  non-determinism warning
- Table (48 pages): RankKind enum examples, fuzzy function options
  (Threshold, IgnoreCase, etc.), Table.StopFolding vs Table.Buffer,
  Table.TransformRows list-not-table output, MissingField.Ignore guidance
- Text/Character/Comparer/Splitter (31 pages): case sensitivity and
  culture guidance, Text.Trim internal-space caveat, Text.NewGuid
  volatility, URI.Combine trailing slash rule
- Number/Record/Type/Value (77 pages): banker's rounding on Number.Round,
  Number.Atan2 argument order (y,x), trig functions use radians,
  Value.NativeQuery SQL injection warning, type open/closed/nullable
  semantics, Value.Metadata behavior
- Accessing Data (23 pages): auth modes, gateway requirements, driver
  prereqs, navigation table structure, query folding capabilities

Also adds Chris Webb's BI Blog to resources page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add list_functions_by_category tool to /api/mcp with full implementation
- Fix stale "23 categories" → "24 categories" in list_categories tool description on MCP page
- Add list_functions_by_category to the MCP page tool reference (count auto-updates via TOOLS.length)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- table-joins: NestedJoin + ExpandTableColumn, all JoinKinds, anti-join, multi-column join, Table.Buffer tip
- pivot-unpivot: Table.Unpivot, Table.UnpivotOtherColumns, null sentinel pattern, Table.Pivot with aggregation
- nested-json-xml: expanding records/lists/nested levels, inconsistent schemas, XML parsing, expand function decision guide
- null-safe-operations: ?? operator, null-safe arithmetic/text/records, List.RemoveNulls, Table.FillDown, null vs missing
- query-performance: query folding, Table.Buffer, List.Buffer, step consolidation, AddColumn type arg, re-evaluation
- custom-function-reuse: inline vs standalone functions, calling across queries, optional params, recursion, fxCleanText example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pqm-guide Ready Ready Preview, Comment Mar 9, 2026 1:24am

@kyleamueller kyleamueller merged commit 1ccdefc into main Mar 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant