-
Notifications
You must be signed in to change notification settings - Fork 204
mito-ai: add v1 google doc rule import #1997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| <p className="rule-validation-error">Please enter a valid Google Docs URL</p> | ||
| )} | ||
| </div> | ||
| )} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: CSS Class Name Mismatch Causes Styling Failure
The Google Docs section's styling isn't applied because its className in RulesForm.tsx (google_doc-section) uses an underscore, which doesn't match the hyphenated CSS selector (.google-docs-section) in RulesForm.css.
Additional Locations (1)
| description: '', | ||
| googleDriveUrl: '', | ||
| lastUpdated: '', | ||
| ruleType: 'manual' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Missing ruleType Causes Rule Loading Failures
The ruleType field was introduced as a required property in the Rule interface. This can cause runtime errors when loading existing rules from the system, as they may not have this field defined.
Additional Locations (1)
| name: '', | ||
| description: '', | ||
| ruleType: 'manual' | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| lastUpdated: '', | ||
| ruleType: 'manual' | ||
| }); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Rule Type Assignment Logic Flaw
When editing an existing rule, handleRuleClick incorrectly assigns the ruleType. The logic explicitly checks only for 'google_doc', causing any other rule_type value from the backend (including undefined) to default to 'manual'. This can misrepresent existing rules.
Description
Testing
Please provide a list of the ways you can "access" or use the functionality. Please try and be exhaustive here, and make sure that you test everything you list.
Documentation
Note if any new documentation needs to addressed or reviewed.
Note
Introduce Google Docs-backed rules with metadata, server/client endpoints to fetch/refresh content, UI to create/edit and validate links, plus startup auto-refresh and tests.
GoogleDriveServiceto fetch Google Docs text via export API.rules/metadata.json; addset_rule_with_metadata,get_rule_metadata,load/savehelpers, andrefresh_google_drive_rulesto sync allgoogle_docrules.rules/handlers.py):GET /rules/:keynow returnscontentplusrule_type,google_drive_url,last_updated(when available).PUT /rules/:keyacceptscontent,rule_type,google_drive_urland persists metadata.POST /rulessupportsaction=fetch_google_drive_contentandaction=refresh_google_drive_rules.setRule,getRule; addfetchGoogleDriveContent,refreshGoogleDriveRules.RulesFormadds source toggle (manual/google_doc), Google Docs URL input with validation, fetch preview, improved loading states, and shows last updated;RulesPageloads/saves rule metadata and supports Google Docs-backed rules.RulesFormtests covering rendering, source switching, URL validation, and loading states.RulesForm.cssfor inputs, Google Docs section, buttons, and loading indicators.Written by Cursor Bugbot for commit b816676. This will update automatically on new commits. Configure here.