Conversation
…ns in compare Add a general-purpose color_static rule to the styling config that applies a single constant background color to every cell in a column, without depending on any data value. Any app using the column_config API can now mark a column's visual role independently of its data. Use it in col_join_dfs to highlight join/primary-key columns with a distinct purple (#6c5fc7), making it immediately obvious which columns are being treated as the join key vs the columns being diff-ed. Also add CLAUDE.md documenting the framework/app architecture principle: visual needs should be expressed through general framework primitives, not one-off CSS hacks or special-cased app logic. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📦 TestPyPI package publishedpip install --index-strategy unsafe-best-match --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ buckaroo==0.12.12.dev22421272339or with uv: uv pip install --index-strategy unsafe-best-match --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ buckaroo==0.12.12.dev22421272339MCP server for Claude Codeclaude mcp add buckaroo-table -- uvx --from "buckaroo[mcp]==0.12.12.dev22421272339" --index-strategy unsafe-best-match --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ buckaroo-table |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ff21a2d3d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
buckaroo/compare.py
Outdated
| "color_rule": "color_categorical", | ||
| "map_name": eq_map, | ||
| "val_column": "membership", | ||
| "color_rule": "color_static", |
There was a problem hiding this comment.
Avoid emitting unsupported
color_static in compare output
col_join_dfs now emits "color_rule": "color_static", but the server-rendered frontend still comes from buckaroo/static/standalone.js (see buckaroo/server/handlers.py), and that bundle’s getStyler switch only handles color_map, color_categorical, color_from_column, and color_not_null (no color_static path). In the default standalone app, join-key highlighting will therefore be ignored, so this feature does not take effect for users until the static bundle is rebuilt/committed with the new rule.
Useful? React with 👍 / 👎.
color_static was added to TS/Python but the compiled standalone.js predates it, so the rule was silently ignored in the browser. Switch to color_categorical with a constant 4-element map of pk_color — membership values 1/2/3 all index into pk_color, giving a solid purple column background that works with the current compiled JS. color_static remains the cleaner long-term implementation once the JS bundle is rebuilt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
color_staticcolor rule in the Buckaroo styling config — applies a single constant background color to every cell in a column without depending on any data value. AddsColorStaticRulestoDFWhole.ts,colorStatic()toStyler.tsx, and handles"color_static"ingetStyler().color_staticwith#6c5fc7(purple) instead of the membership-based categorical coloring, making it immediately obvious which columns are the join key vs the data-diff columns.CLAUDE.md: Documents the framework/app architecture principle — visual needs should be expressed through general framework primitives, not one-off CSS hacks or per-feature special cases.Motivation
Before this change, join-key columns in the compare view used the same pink/green/blue membership coloring as data columns. There was no visual distinction — users had no way to tell which columns were being treated as the primary key.
The fix was to add a proper general-purpose
color_staticrule (useful for any app that wants to mark a column's role rather than its value), then use it incol_join_dfs.Test plan
compare_test.pytests still passtest_load_compare.pystill passescolor_staticcan be set viacolumn_configin any Storybook/standalone usage🤖 Generated with Claude Code