DIDView: validate DID format #176

Merged
jose merged 8 commits from didview-invalid-did-handling into master 2025-08-27 08:53:48 +00:00
Owner
  • Add DID validation using isDid() function to prevent invalid DIDs from loading current user's info
  • Show error message and redirect to HomeView for invalid DID formats (e.g., /did/0)
  • Import NOTIFY_CONTACT_INVALID_DID constant for consistent error messaging

Resolves: DIDView loading current user's info for invalid DID parameters

- Add DID validation using isDid() function to prevent invalid DIDs from loading current user's info - Show error message and redirect to HomeView for invalid DID formats (e.g., /did/0) - Import NOTIFY_CONTACT_INVALID_DID constant for consistent error messaging Resolves: DIDView loading current user's info for invalid DID parameters
jose added 1 commit 2025-08-20 13:14:49 +00:00
- Add DID validation using isDid() function to prevent invalid DIDs from loading current user's info
- Show error message and redirect to HomeView for invalid DID formats (e.g., /did/0)
- Import NOTIFY_CONTACT_INVALID_DID constant for consistent error messaging

Resolves: DIDView loading current user's info for invalid DID parameters
trentlarson reviewed 2025-08-27 01:48:27 +00:00
@@ -172,0 +182,4 @@
// Should redirect to contacts page
await expect(page).toHaveURL(/.*\/contacts$/);
});
Owner

Love the additional test!

Love the additional test!
trentlarson marked this conversation as resolved
trentlarson reviewed 2025-08-27 01:49:37 +00:00
@@ -172,0 +181,4 @@
// Should redirect to contacts page
await expect(page).toHaveURL(/.*\/contacts$/);
});
Owner

Note that the test seems to go to the front page, so that may not match this test that goes to "contacts". 🤷

Note that the test seems to go to the front page, so that may not match this test that goes to "contacts". 🤷
trentlarson marked this conversation as resolved
jose added 19 commits 2025-08-27 08:45:07 +00:00
- Stricter targeting of buttons since Register and Export Data dialogs appear on screen at the same time
- Locate success notification first since it appears first (and cannot be "clicked" through the overlapping dialog-overlay)
- Add pre-commit and pre-push hooks for build file protection
- Create comprehensive guard script for BUILDING.md validation
- Add npm scripts for guard setup and testing
- Integrate with existing build system
- Update main README with guard system overview
- Create detailed guard implementation guide
- Add PR template documentation and usage examples
- Document opt-in hook activation process
- Create structured template for build-related changes
- Include L1/L2/L3 change classification
- Require BUILDING.md updates for sensitive file changes
- Add artifact SHA256 validation for L3 changes
- Create validate-markdown.sh for compliance checking
- Add fix-markdown.sh for automatic formatting fixes
- Exclude node_modules from validation scope
- Integrate with npm scripts for easy usage
- Add AI Generation Guidelines with alwaysApply: true
- Extend globs to include .mdc files
- Ensure AI agents follow rules during content creation
- Improve markdown automation system integration
- Create comprehensive guard rules for build system protection
- Define protected file patterns and validation requirements
- Include risk matrix and required validation checklists
- Add emergency procedures and rollback playbooks
- Add Husky Git hooks for pre-commit and pre-push validation
- Create guard script for BUILDING.md update enforcement
- Implement PR template with L1/L2/L3 change classification
- Add markdown validation and auto-fix scripts
- Create comprehensive documentation and MDC rules
- Ensure zero-disruption deployment with opt-in activation
- Update BUILDING.md with current build system information
- Modernize various README files across the project
- Update CHANGELOG.md with recent changes
- Improve documentation consistency and formatting
- Update platform-specific documentation (iOS, Electron, Docker)
- Enhance test documentation and build guides
- Remove all GitHub-specific workflows and configurations
- Update .dockerignore to exclude .github directory
- Clean up GitHub Actions workflows and branch protection rules
- Complete transition to Gitea Actions and Husky hooks
- Create setup script for markdown pre-commit hooks
- Automate installation of markdownlint and related tools
- Provide easy setup for markdown compliance system
Add comprehensive Cursor rules file that extends base context with universal
constraints for creating developer-grade, reproducible technical guides.
Includes structured templates, validation checklists, and evidence-backed
documentation standards.

- Establishes 11 required sections for technical guides
- Enforces UTC timestamps and evidence requirements
- Provides Mermaid diagram requirements and API contract templates
- Includes competence and collaboration hooks per base context
- Sets coaching level to standard with 10-minute timeboxing
Add two new Harbor Pilot directives to improve code quality and planning:

1. Historical Comment Management: Guidelines for transforming or removing
   obsolete comments into actionable architectural guidance
2. No Time Estimates: Rule prohibiting time estimates in favor of
   phase-based planning with complexity levels and milestones

Both rules are integrated into main Harbor Pilot directive for automatic
application across all operations.
- Create comprehensive MDC rule for systematic Playwright test failure investigation
- Integrate rule into harbor_pilot_universal.mdc for team-wide access
- Include investigation workflow, diagnostic commands, and evidence-based analysis
- Document specific failure patterns (alert stacking, selector conflicts, timing issues)
- Provide practical examples from recent test failure investigation
- Add investigation commands for error context, trace files, and page snapshots

This rule transforms ad-hoc test debugging into systematic investigation process,
leveraging Playwright's built-in debugging tools for faster root cause identification.
Author
Owner

I fixed the tests by:

  • Making .toHaveURL expect "/" instead of "/contacts" (expected behavior)
  • Merging a different branch that updates the tests to expect the second dialog after adding a contact

Ran the tests again, and it passed with flying colors! I'll go ahead and merge this back.

I fixed the tests by: - Making `.toHaveURL` expect "/" instead of "/contacts" (expected behavior) - Merging a different branch that updates the tests to expect the second dialog after adding a contact Ran the tests again, and it passed with flying colors! I'll go ahead and merge this back.
jose merged commit 43e7bc1c12 into master 2025-08-27 08:53:48 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: trent_larson/crowd-funder-for-time-pwa#176