Skip to content

feat: add rtl filtering and guidance for search/design-system - #416

Open
notedavidrinaldi wants to merge 3 commits into
nextlevelbuilder:mainfrom
notedavidrinaldi:feat/rtl-search-design-system
Open

feat: add rtl filtering and guidance for search/design-system#416
notedavidrinaldi wants to merge 3 commits into
nextlevelbuilder:mainfrom
notedavidrinaldi:feat/rtl-search-design-system

Conversation

@notedavidrinaldi

Copy link
Copy Markdown

Summary

Add RTL support for search and design-system generation.

Changes

  • Add --rtl flag support in CLI (search.py) for both domain search and design-system mode.
  • Filter search candidates with rtl_compatible when --rtl is used.
  • Add rtl_compatible column to styles.csv, colors.csv, products.csv.
  • Add RTL guidance section to design-system outputs (ASCII/Markdown/MASTER.md).
  • Keep outputs in sync across src/, cli/assets/, and .claude/.
  • Fix runtime markdown anti-pattern formatting bug for RTL output.

Validation

  • npm --prefix cli run check:assets
  • npm --prefix cli run validate:csv
  • npm --prefix cli run smoke:domains
  • npm --prefix cli run smoke:stacks
  • npm --prefix cli run typecheck
  • npm --prefix cli run build
  • npm --prefix cli run prepublishOnly

Closes #409

@darajoukar

Copy link
Copy Markdown

Thanks @notedavidrinaldi for the comprehensive implementation! The PR looks solid and covers all the key functionality.

I noticed one difference from the earlier discussion with @clark-cant — the original suggestion was to use an rtl_level column with values full/partial/caveats instead of a boolean rtl_compatible column. This would allow for more flexible filtering (e.g., --rtl=full for strict RTL-only results).

Would you be open to updating the schema to match that approach? I'd be happy to help with the changes if needed. Let me know your thoughts!

Thanks again for your work on this! 🙌

@darajoukar

Copy link
Copy Markdown

@notedavidrinaldi,

Thank you for implementing the requested changes so promptly. I have reviewed the latest commit (3337387) and confirm that the migration to the tri-state rtl_level column (full, partial, caveats) with backward compatibility addresses all the points raised.

The logic in _resolve_rtl_level and the updated search filter work as expected, and the documentation updates are clear. This is a comprehensive and well-executed enhancement.

I appreciate your collaboration and the quality of your work. Please let me know if you require any further review or assistance before merging.

Best regards,
darajoukar

@clark-cant clark-cant left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Schema Mismatch with Maintainer Specification

Summary: PR adds RTL filtering and design-system guidance, which is a welcome feature. However, there is a critical schema mismatch between what was specified and what was implemented.

Risk level: Medium — feature scope is appropriate but data schema does not match maintainer's explicit specification.

Mandatory Gates

  • Duplicate/prior implementation: clear — no prior RTL implementation found
  • Project standards: docs found — maintainer specified exact schema in issue #409 comment
  • Strategic necessity: clear value — RTL support expands accessibility for Arabic/Persian/Hebrew markets

Findings

Important (must fix):

  1. Schema mismatch: The maintainer explicitly specified a rtl_level column with tri-state values (full, partial, caveats) for flexible filtering. The PR implements rtl_compatible with boolean TRUE/FALSE values instead. This contradicts the specification at #409 (comment)

  2. Comment/code discrepancy: Your comment at #409 (comment) states you "switched to tri-state rtl_level (full|partial|caveats)" but the actual diff still shows:

    • CSV columns named rtl_compatible (not rtl_level)
    • Boolean values TRUE/FALSE (not full/partial/caveats)
    • search.py filtering: row.get('rtl_compatible', 'TRUE').upper() == 'TRUE'
  3. Search flag interface: Maintainer specified --rtl with optional values (--rtl=full, --rtl=partial) for granular filtering. PR implements --rtl as a simple boolean flag with no value options.

What Looks Good

  • ✅ RTL guidelines section in design-system output is well-structured
  • ✅ Source-of-truth sync across src/, cli/assets/, .claude/skills/ is maintained
  • ✅ README and skill-content.md updates included
  • ✅ Closes #409 reference in PR body

Required Actions

  1. Rename rtl_compatible column to rtl_level in all CSVs
  2. Change values from TRUE/FALSE to full/partial/caveats based on RTL suitability
  3. Update search.py to support --rtl with optional values per specification
  4. Verify the commit you referenced (3337387) actually contains these changes

Verdict: Request changes — schema must align with maintainer specification before merge.

Posted by github-maintain cron at $(date -u +"%Y-%m-%dT%H:%M:%SZ")

@darajoukar

Copy link
Copy Markdown

@notedavidrinaldi,

Following up on the review from @clark-cant. I have also reviewed the current state of the PR and the points raised are critical for alignment with the project's specification:

  • The column should be named rtl_level with values full, partial, caveats (not a boolean rtl_compatible column).
  • The --rtl flag should support optional values (e.g., --rtl=full, --rtl=partial) for granular filtering.

I understand this is a significant change. If you need any assistance with updating the schema or the search logic, I am available to help. We can coordinate to get this PR in line with the specification.

Let me know your thoughts or if you need me to open a separate PR with the required fixes.

Best,
darajoukar

@clark-cant clark-cant left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated Review: Partial Fix Acknowledged

Summary: PR partially addresses the schema mismatch from the previous review. CSV columns are now correct, but the CLI flag interface remains incomplete.

What's Fixed ✅

  1. CSV schema corrected: Columns are now named rtl_level with tri-state values (full, partial, caveats) instead of boolean rtl_compatible. This matches the maintainer specification.
  2. Internal filtering logic: The _resolve_rtl_level function in core.py properly handles the tri-state values with backward compatibility.
  3. Data sync: Source-of-truth sync across src/, cli/assets/, .claude/skills/ is maintained.

What's Still Missing ❌

  1. --rtl flag interface: Still implemented as action="store_true" (boolean). The maintainer specification requires nargs="?" with optional values for granular filtering:

Current implementation:

parser.add_argument("--rtl", action="store_true", help="Filter results to RTL-friendly entries")

Required implementation:

parser.add_argument(
    "--rtl",
    nargs="?",
    const="all",
    choices=["all", "full", "partial", "caveats"],
    default=None,
    help="Filter results by RTL compatibility level"
)

This would enable:

  • --rtl (no value) → all RTL-compatible entries
  • --rtl=full → only rtl_level == "full"
  • --rtl=partial → only rtl_level == "partial"

Required Actions

  1. Update the --rtl flag to use nargs="?" with choices as specified
  2. Update the search filter logic to respect the optional value (currently filters all RTL entries regardless)
  3. Verify the change works with both --domain search and --design-system modes

Verdict

Changes requested — CSV schema is now correct, but the CLI interface needs the granular filtering capability. This is a small change (~10 lines in search.py).

Posted by github-maintain cron

@clark-cant clark-cant added agent:github-maintain Processed by github-maintain automation pr:reviewed PR reviewed by maintain workflow pr:changes-requested Maintain review requested changes labels Jul 19, 2026
@DeaaJobran

Copy link
Copy Markdown

Hi @notedavidrinaldi — I prepared a helper PR addressing the requested RTL changes and current merge conflicts: notedavidrinaldi#1

It adds granular --rtl filtering, updates the RTL classifications, synchronizes the generated assets, and adds tests/documentation. All local validation passed. Once merged into feat/rtl-search-design-system, PR #416 should update automatically.

@notedavidrinaldi

Copy link
Copy Markdown
Author

Hi, sorry for the delayed response 🙏

Thank you for the review and for the helpful feedback. I’ve addressed the RTL-related concern and pushed the fixes on branch feat/rtl-search-design-system (commit cca4313).

Summary of updates:

  • --rtl now supports level-based filtering (full, partial, caveats, all).
  • Backward compatibility is preserved (--rtl without value still works).
  • Core filtering logic now respects RTL levels correctly.
  • Documentation and usage examples were updated accordingly.

Please let me know if you want any further adjustments — happy to handle them right away. Thanks again! 🙌

@darajoukar

Copy link
Copy Markdown

@notedavidrinaldi,

Thank you for your continued work on this and for pushing the fixes to your branch. As you mentioned, the level-aware --rtl flag and the updated documentation appear to address the feedback from the review.

To ensure this can be merged, could you please update this PR (#416) with the latest changes from your feat/rtl-search-design-system branch (commit cca4313)? Once the PR is updated, we can ask @clark-cant for a final review.

I'm available to help if you need anything.

Best regards,
darajoukar

@clark-cant

Copy link
Copy Markdown
Contributor

Hey @notedavidrinaldi 👋

Thanks for pushing the RTL fixes in commit cca4313 — the level-aware --rtl flag with full|partial|caveats|all filtering and backward-compatible fallback looks like it addresses the earlier review feedback well. The rtl_level tri-state column in CSVs and the RTL Guidelines section in design system output align with the original spec from #409.

Current blocker: This PR has merge conflicts with main (mergeStateStatus: DIRTY). Could you rebase or merge origin/main into your branch to resolve the conflicts? Once that is done we can do a final review pass and move toward merge.

@darajoukar thanks for the ongoing coordination and review — your feedback on the rtl_level schema was spot-on.

Posted by github-maintain cron

@clark-cant clark-cant left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review: Previous Findings Addressed ✅

Summary: PR now implements the maintainer-specified schema and CLI interface correctly.

What's Fixed

  1. --rtl flag interface: Now uses nargs="?" with choices ["full", "partial", "caveats", "all"] — matches specification exactly ✅
  2. Integration: Flag is passed to both generate_design_system() and search() functions ✅
  3. Documentation: skill-content.md includes RTL Design Support section with usage examples ✅

Remaining Blocker

Merge conflicts: PR is currently DIRTY and cannot be merged until rebased against main.

@notedavidrinaldi please rebase/merge from main to resolve conflicts. Once clean, this can be merged.

Verdict: Approve — code changes are correct. Merge blocked by conflicts.

Posted by github-maintain cron at $(date -u +"%Y-%m-%dT%H:%M:%SZ")

@clark-cant clark-cant left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Schema mismatch with maintainer specification

@notedavidrinaldi thanks for the RTL implementation work and the recent commit cca4313 that added level-aware filtering.

However, the PR still has a schema mismatch with the maintainer specification from issue #409:

Current implementation

  • CSV column: rtl_compatible with boolean TRUE/FALSE values
  • --rtl flag: accepts full|partial|caveats|all but the underlying data doesn't support this

Maintainer specification

  • CSV column should be: rtl_level with tri-state values (full, partial, caveats)
  • --rtl flag should filter based on the rtl_level column values

What needs to change

  1. CSV schema: Rename rtl_compatible to rtl_level in styles.csv, products.csv, and colors.csv
  2. Data values: Change from boolean TRUE/FALSE to tri-state full|partial|caveats
  3. Search logic: Update search.py to filter on rtl_level column instead of rtl_compatible

The good news: your commit cca4313 already has the correct --rtl flag interface with optional values. The main issue is the underlying CSV data structure doesn't match.

Also noting this PR is currently blocked by merge conflicts against main. A rebase will be needed.

Scope check

  • ✅ Addresses issue #409 (RTL support proposal)
  • ✅ Implements maintainer-specified schema (mostly - data values need correction)
  • ⚠️ 21 files changed, +1963/-1446 - this is on the larger side but acceptable for a feature that touches data files across source/cli/assets
  • ⚠️ Merge conflicts need resolution

Please update the CSV data to use rtl_level with tri-state values and rebase from main. Once those changes are in, this should be ready for approval.

cc @darajoukar who has been following this closely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:github-maintain Processed by github-maintain automation pr:changes-requested Maintain review requested changes pr:reviewed PR reviewed by maintain workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: Add RTL (Right-to-Left) Support for Multi-Platform UI-UX

6 participants