Extract notification section into reusable component #150

Open
anomalist wants to merge 9 commits from notification-section into master
Owner
  • Created NotificationSection.vue with complete notification functionality
  • Updated AccountViewView to use new component via props
  • Removed notification methods from AccountViewView
  • Fixed FontAwesome import to use FontAwesomeIcon
  • Cleaned up unused imports and dependencies
- Created NotificationSection.vue with complete notification functionality - Updated AccountViewView to use new component via props - Removed notification methods from AccountViewView - Fixed FontAwesome import to use FontAwesomeIcon - Cleaned up unused imports and dependencies
anomalist added 1 commit 2025-07-31 03:29:33 +00:00
- Created NotificationSection.vue with complete notification functionality
- Updated AccountViewView to use new component via props
- Removed notification methods from AccountViewView
- Fixed FontAwesome import to use FontAwesomeIcon
- Cleaned up unused imports and dependencies
Owner

One challenge I have with these components is that they are coupled to the parent view; for example, all the "notifying-" properties are passed in, so there is potential for overlapping logic in both files.

A new component adds a bit of complexity because you cannot see all the behavior in one file; it is worth that separation if the elements are encapsulated well, so that there are very few interdependencies. In this case, it looks like it's taking all the properties while sharing them with the parent page.

Take a look and see if those "notifying-" properties are now unused in the parent page, and if so then let's clean those up and keep as much as possible internal to the component. If that's not possible then feel free to say so (and consider if a separate component is worthwhile).

One challenge I have with these components is that they are coupled to the parent view; for example, all the "notifying-" properties are passed in, so there is potential for overlapping logic in both files. A new component adds a bit of complexity because you cannot see all the behavior in one file; it is worth that separation if the elements are encapsulated well, so that there are very few interdependencies. In this case, it looks like it's taking all the properties while sharing them with the parent page. Take a look and see if those "notifying-" properties are now unused in the parent page, and if so then let's clean those up and keep as much as possible internal to the component. If that's not possible then feel free to say so (and consider if a separate component is worthwhile).
Author
Owner

One challenge I have with these components is that they are coupled to the parent view; for example, all the "notifying-" properties are passed in, so there is potential for overlapping logic in both files.

A new component adds a bit of complexity because you cannot see all the behavior in one file; it is worth that separation if the elements are encapsulated well, so that there are very few interdependencies. In this case, it looks like it's taking all the properties while sharing them with the parent page.

Take a look and see if those "notifying-" properties are now unused in the parent page, and if so then let's clean those up and keep as much as possible internal to the component. If that's not possible then feel free to say so (and consider if a separate component is worthwhile).

Fair point. Complexity has more than one dimension to it. Maybe we can have the best here. I find the length of files to make things hard to grasp what's going on in the page. From a UI/UX standpoint I think its better to keep pages brief as possible. Your point about coupling is valid. I'll think about this.

> One challenge I have with these components is that they are coupled to the parent view; for example, all the "notifying-" properties are passed in, so there is potential for overlapping logic in both files. > > A new component adds a bit of complexity because you cannot see all the behavior in one file; it is worth that separation if the elements are encapsulated well, so that there are very few interdependencies. In this case, it looks like it's taking all the properties while sharing them with the parent page. > > Take a look and see if those "notifying-" properties are now unused in the parent page, and if so then let's clean those up and keep as much as possible internal to the component. If that's not possible then feel free to say so (and consider if a separate component is worthwhile). Fair point. Complexity has more than one dimension to it. Maybe we can have the best here. I find the length of files to make things hard to grasp what's going on in the page. From a UI/UX standpoint I think its better to keep pages brief as possible. Your point about coupling is valid. I'll think about this.
anomalist added 100 commits 2025-08-15 08:21:57 +00:00
Reviewed-on: #145
Reviewed-on: #148
- Eliminate dependence on arbitrary maxlength for truncation
- Ensure truncation is purely visual, and does not touch content
I believe logger is not an option. https://playwright.dev/docs/api/class-testoptions
- Add description, amountInput, and unitCode parameters to GiftedDialog.open()
- Pass offer details to GiftedDialog in ProjectViewView
- Update ContactsView to handle new GiftedDialog parameters
- Replace @Emit decorator with direct $emit calls in ContactListItem
- Fix DID comparison from loose to strict equality in nameForDid function
- Resolve issue where giver/recipient names showed as "this unnamed user"

The @Emit decorator was not properly spreading array parameters, causing
the parent component to receive arrays instead of separate string parameters.
Add detailed analysis of GiftedDialog component architecture including:
- DRY and SOLID principles compliance assessment
- Cognitive load analysis with before/after comparisons
- Architectural complexity remediation plan
- Phased implementation strategy (cognitive load → composable architecture)
- Component hierarchy and dependency analysis
- Performance and security considerations

The document provides actionable recommendations for reducing complexity
while maintaining functionality, with specific code examples and metrics.
- Preserve description, amount, and unit code when navigating between gifting steps
- Add form field props to EntitySelectionStep and GiftedDialog components
- Update ContactGiftingView to handle form state persistence in URL parameters
- Add offer context support to gifting flow
- Add offerId prop to EntitySelectionStep for offer fulfillment context
- Pass offerId through GiftedDialog to EntitySelectionStep
- Update ContactGiftingView to handle offerId from route query parameters
- Extract offer details (description, amount, unitCode) for pre-population
- Add type checking to build scripts for production/test builds only
- Fix TypeScript errors in migration service, router, and platform services
- Add electronAPI type declarations for Electron platform
- Remove type checking from development builds for faster hot reload
- Update tsconfig.node.json to resolve configuration conflicts
- Ensure type safety for production while maintaining fast development workflow
- Add recipientEntityTypeOverride prop to GiftedDialog component
- Add data-testid and data-recipient-entity-type-override attributes for testing
- Update updateEntityTypes() to respect recipientEntityTypeOverride when set
- Add watcher for recipientEntityTypeOverride prop changes
- Update ClaimView to pass recipient entity type override based on project context
- Improve recipient determination logic in ClaimView for person vs project recipients
- Change HomeView to use $accountSettings() method which returns correct isRegistered value
- Remove isRegistered: false default that was overriding database values
- Fix settings override issue where empty defaults were overriding activeDid
- Remove excessive settings tracing logs to clean up console output
- Ensure consistent registration status between HomeView and AccountViewView

The HomeView was incorrectly showing users as unregistered while AccountViewView showed them as registered due to using $settings() (returns null) instead of $accountSettings() (returns correct database value).
Replace complex updateEntityTypes() method with explicit giverEntityType and
recipientEntityType props. This makes the component more declarative and
maintainable by removing hidden logic and making entity type relationships
clear at the call site.

- Remove updateEntityTypes() method and related watchers
- Add explicit giverEntityType and recipientEntityType props with defaults
- Update all views to use inline logic for entity type determination
- Fix entity type preservation in navigation flows
- Enhance query parameter passing for better context preservation
- Fix recipient reset issue in ContactGiftingView
- Resolve entity type mismatch in HomeView project button flow

Files changed:
- GiftedDialog.vue: Remove complex logic, add explicit props
- EntitySelectionStep.vue: Enhanced query parameter handling
- ContactGiftingView.vue: Improved context preservation
- HomeView.vue, ProjectViewView.vue, ClaimView.vue, ContactsView.vue:
  Updated to use explicit entity type props
- Add refactoring documentation
- Remove hard-coded PROD_SHARE_DOMAIN from src/constants/app.ts
- Update all sharing functionality to use environment-specific APP_SERVER
- Rewrite domain configuration documentation to reflect unified approach
- Simplify domain management with single APP_SERVER constant
- Update README.md examples to use APP_SERVER for all URL generation

This change eliminates the complexity of separate constants for different
URL types and provides consistent environment-specific configuration for
all functionality including sharing.
- Add ContactMaybeWithJsonStrings type usage for internal database operations
- Implement $normalizeContacts() method to handle both JSON string and array formats
- Update $contacts(), $getContact(), and $getAllContacts() to use normalization
- Fix $updateContact() to properly convert contactMethods arrays to JSON strings
- Add validation to filter out malformed contact method objects
- Update ContactEditView to handle malformed data gracefully

Resolves issue where contactMethods could be stored as JSON strings in database
but expected as arrays in components, causing "Cannot create property 'label' on number '0'" errors.
- Move Android-specific API server logic from common.sh to build-android.sh
- Remove unnecessary ANDROID_BUILD environment variable
- Set localhost:3000 as default in common.sh for all Capacitor builds
- Override to 10.0.2.2:3000 specifically in build-android.sh for Android development
- Fix execution order issue where common.sh ran before ANDROID_BUILD was set
- Maintain proper separation: Android emulator uses 10.0.2.2, iOS simulator uses localhost
Update Android SDK configuration to target API 36 (Android 16):
- Update compileSdkVersion and targetSdkVersion from 35 to 36
- Update suppressUnsupportedCompileSdk from 34 to 36
- Maintains minSdkVersion at 22 for broad device compatibility
- Verified build system compatibility with Gradle 8.13
Implement --api-ip parameter for Android builds with smart defaults:
- Defaults to 10.0.2.2 for emulator development when no IP specified
- Supports custom IP for physical device development
- Added npm scripts for common use cases (dev:custom, test:custom)
- Updated help documentation with usage examples
- Created comprehensive documentation with troubleshooting guide

Usage:
  ./scripts/build-android.sh --dev                    # Default 10.0.2.2
  ./scripts/build-android.sh --dev --api-ip 192.168.1.100  # Custom IP
Extend custom API IP feature to iOS platform with platform-appropriate defaults:
- Android: Defaults to 10.0.2.2 for emulator, custom IP for physical devices
- iOS: Uses localhost for simulator, custom IP for physical devices
- Added npm scripts for iOS custom IP builds (dev:custom, test:custom)
- Updated documentation to cover both platforms with examples
- Consistent --api-ip parameter across Android and iOS build scripts

Usage:
  ./scripts/build-ios.sh --dev                    # Default localhost
  ./scripts/build-ios.sh --dev --api-ip 192.168.1.100  # Custom IP
Add comprehensive documentation explaining the order of precedence for
environment variables in TimeSafari project. Covers shell script overrides,
platform-specific configurations, .env file usage, and API alignment between
claim and partner APIs. Includes troubleshooting guide and best practices
for maintaining consistent environment configuration across development,
test, and production environments.
Update measure_time function to properly handle command exit codes:
- Check command success/failure and return appropriate exit code
- Log failure messages with timing and exit code information
- Ensure TypeScript type checking failures stop the build process
- Maintains timing logs for both success and failure cases

This prevents deployment of code with TypeScript type errors by making
test and production builds fail fast when tsc --noEmit reports issues.
Replace notify.confirm() with $notify() in ProjectsView to support complex modal
with custom Yes/No buttons and routing callbacks for non-registered users.
- Fix navigation to use correct QR code routes (contact-qr/contact-qr-scan-full)
- Replace deep link generation with CSV format QR codes
- Remove unused imports and fix notification method calls
- Aligns with master branch behavior for contact sharing

Resolves issue where Share Your Info showed "not implemented" and generated
localhost deep links instead of proper CSV format QR codes.
- Fixed contactsToExportJson to properly handle contactMethods as arrays
- Fixed contactToCsvLine to correctly stringify contactMethods arrays
- Removed unused parseJsonField function (consolidated with PlatformServiceMixin)
- Resolves issue where contact backup exports showed contactMethods as strings instead of JSON arrays
- Fixed contactsToExportJson to export contactMethods as proper arrays instead of stringified JSON
- Added JSON parsing for contactMethods in _mapColumnsToValues when retrieving from database
- Updated $insertContact to properly handle contactMethods field storage
- Removed unused ContactWithJsonStrings import
ref:  https://app.clickup.com/t/86b63ffpb
Resolves issue where contact backup exports showed contactMethods as "[]" strings instead of proper JSON arrays.
Remove unnecessary contact object mapping in contactsToExportJson function.
The contacts array can be used directly since it already contains all required
fields in the correct format.
- Replace CSV QR value copying with URL generation for better UX
- Add generateEndorserJwtUrlForAccount import and Account type
- Implement proper error handling for URL generation failures
- Maintain consistency with ContactQRScanFullView behavior
- Add documentation for the URL solution implementation

Recipients can now click shared URLs to add contacts directly instead of
manually pasting CSV data into input fields.

addresses:  https://app.clickup.com/t/86b63xhz4
- Add Quick Start for Developers section with most common commands
- Add clean:all command to package.json for cleaning all platforms
- Update BUILDING.md with accurate command descriptions and workflow
- Reorganize sections to prioritize npm commands at the top
- Add comprehensive environment configuration documentation
- Update appendices A and B with current build system information
- Fix port number in development server documentation (8080)
- Add troubleshooting quick fixes and platform-specific guidance
- Document environment variable precedence and loading process
- Add comprehensive Vite configuration documentation in Appendix B
- Replaced error messages in GiftedDetailsView
- Maintained consistency between GiftedDialog and GiftedDetailsView (error message constants, amountInput)
- Add conditional checks for person vs project entity types when setting DID fields
- Simplify project ID assignment logic by removing redundant entity type checks
- Preserve existing recipient context when selecting givers in ContactGiftingView, especially when dealing with "Unnamed" entity
- ContactQRScanShowView: Move notify initialization to created() lifecycle hook
- DIDView: Remove axios getter accessing non-existent platformService.axios
- DIDView: Enhance setVisibility() with proper server API error handling
- Add missing logger import to fix 'Cannot find name logger' error
- Migrate from  to createNotifyHelpers pattern with proper NotificationIface type
- Remove unnecessary SQL query from created() method for cleaner initialization
- Add educational documentation to all methods explaining workflows, API endpoints, and user experience
- Update all notify calls to use new format (error, success, confirm methods)
- Improve code maintainability with detailed method documentation
- Remove unused handleConfirmClick() and emitConfirmClaim() methods from ActivityListItem
- Remove unused canConfirm computed property and confirmerIdList prop
- Remove unused imports: isGiveClaimType, notifyWhyCannotConfirm, containsHiddenDid
- Remove unused confirmClaim() method from HomeView
- Remove unused @confirm-claim event binding and :confirmer-id-list prop
- Remove unused imports: serverUtil, NOTIFY_CONFIRMATION_ERROR

The confirmation functionality was not being used in ActivityListItem as there was no UI to trigger it. Confirmation is handled in other components like ClaimView and ConfirmGiftView.
- Remove unused loadSettings() method (functionality moved to initializeIdentity)
- Remove unused checkRegistrationStatus() method (functionality moved to initializeIdentity)
- Deduplicate ensureCorrectApiServer() calls (now only called once in initializeIdentity)
- Clean up import statement formatting for NOTIFY_CONTACT_LOADING_ISSUE

Reduces code complexity by eliminating 66 lines of dead code while maintaining
all existing functionality. Improves maintainability by consolidating initialization
logic into a single method.
- Remove debug logging and window.__SHARE_CONTACT_DEBUG__ property
- Clean up eslint-disable comments and console.log statements
- Simplify mounted() method to focus on core functionality
- Transferred form validation error handling to an earlier step
- Added validation for negative input (similar to gifting forms)
- Switched amount input to component version for consistency
- Fixed improper referencing for PlatformServiceMixin
- Fixed case where exported data has no contact methods

authored-by: Matthew Raymer <matthew.raymer@anomalistdesign.com>
- Initialize notify earlier inside created()
Add comprehensive logging configuration system with environment variable support.
Environment files now include appropriate log levels per build mode:
- Development: debug (maximum visibility)
- Production: warn (minimal noise)
- Testing: info (balanced output)

Includes smart default behavior based on platform and environment,
enhanced logger methods for level checking, and comprehensive documentation.
All existing logging calls remain backward compatible.

Closes logging configuration request
Fixed malformed comment in .env.development that was causing
"export: production).=: not a valid identifier" error in build scripts.
The comment was split across lines, causing the shell to interpret
" production)." as a variable assignment.

- Removed malformed comment line that was breaking build:web script
- Build script now successfully validates environment and starts server
- Resolves issue preventing Playwright tests from running properly
- Offer dialog was recently updated to use the component version of inputAmount
- Remove imageCache Map that only stored null values
- Remove selectedImageData Blob property (never used)
- Remove cacheImageData method and related function props
- Remove handleImageLoad method from ActivityListItem
- Clean up ImageViewer component props
- Fix TypeScript compilation by replacing legacy logConsoleAndDb calls
- Replace logConsoleAndDb with logger.error in deepLinks service
- Images continue to work via direct URL references

The image cache system was non-functional and only stored null values.
ImageViewer component ignored blob data and only used URLs.
Fixed production build failure caused by undefined logConsoleAndDb function.
Removing dead code improves maintainability without affecting functionality.
- Fix TypeScript compilation errors in deepLinks service by replacing logConsoleAndDb with logger.error
- Add ESLint disable comments for necessary 'any' type usage in worker polyfills and Vue mixins
- Add ESLint disable comments for console statements in test files and debugging code
- Production build now succeeds with npm run build:web:prod
- TypeScript compilation passes with npm run type-check

The deepLinks service was using undefined logConsoleAndDb function causing build failures.
Worker context polyfills and Vue mixin complexity require 'any' type usage in specific cases.
Console statements in test files and debugging code are intentionally used for development.
- Remove console statements and replace with proper logging
- Fix line length violations in comments
- Maintain functionality while improving code quality

Reduces lint warnings from 30 to 25 by addressing:
- 3 console statement violations
- 2 line length violations
Reviewed-on: #156
Reviewed-on: #160
- Replace $notify any types with proper NotifyFunction interface
- Import NotifyFunction type from utils/notify
- Eliminate 5 TypeScript any type warnings
- Improve type safety for notification system across components

Reduces lint warnings from 25 to 20 by addressing high-impact,
low-effort notification type issues. Maintains full functionality
while improving code quality and IntelliSense support.
Reviewed-on: #163
anomalist added 1 commit 2025-08-15 09:06:34 +00:00
- Created NotificationSettingsService class for settings and permission logic
- Separates business logic from UI presentation in NotificationSection
- Maintains component lifecycle boundary while improving testability
- Service handles settings hydration, persistence, and permission management
- Component now focuses purely on UI with computed properties for template access

- Added src/composables/useNotificationSettings.ts
- Updated src/components/NotificationSection.vue to use service
- Resolved TypeScript type issues with PlatformServiceMixin integration
anomalist added 1 commit 2025-08-15 09:06:50 +00:00
- Added Concision-First Decision Framework to guide component creation
- Included Rule of Three guardrail for when to extract components
- Added practical PR language guidance for code reviews
- Enhanced agent role to prefer concision where appropriate
- Restored priority levels, cross-references, and version history
- Updated examples to reflect successful NotificationSection refactor

- Enhanced .cursor/rules/component-creation-ideals.mdc to v2.0.0
- Added comprehensive migration patterns and testing guidelines
- Established architectural standards for future component development
trentlarson reviewed 2025-08-17 14:09:45 +00:00
@@ -0,0 +1,321 @@
---
alwaysApply: true
Owner

This one does make some sense to always include.

This just reminds me that we have others that probably shouldn't be included on every convo:
.cursor/rules/legacy_dexie.mdc:alwaysApply: true
.cursor/rules/documentation.mdc:alwaysApply: true
.cursor/rules/absurd-sql.mdc:alwaysApply: true
.cursor/rules/version_control.mdc:alwaysApply: true

BTW, these ones might be consolidated. (... or if the decision record is just historical then maybe it's not important every time.)
.cursor/rules/timesafari.mdc:alwaysApply: true
.cursor/rules/architectural_decision_record.mdc:alwaysApply: true

I'd support that refactor here because we see it now or logged as a future issue.

This one does make some sense to always include. This just reminds me that we have others that probably shouldn't be included on every convo: .cursor/rules/legacy_dexie.mdc:alwaysApply: true .cursor/rules/documentation.mdc:alwaysApply: true .cursor/rules/absurd-sql.mdc:alwaysApply: true .cursor/rules/version_control.mdc:alwaysApply: true BTW, these ones might be consolidated. (... or if the decision record is just historical then maybe it's not important every time.) .cursor/rules/timesafari.mdc:alwaysApply: true .cursor/rules/architectural_decision_record.mdc:alwaysApply: true I'd support that refactor here because we see it now or logged as a future issue.
trentlarson changed target branch from build-improvement to master 2025-08-17 14:11:00 +00:00
Owner

Note that I modified this to merge to master.

Note that I modified this to merge to master.
trentlarson reviewed 2025-08-17 14:14:10 +00:00
@@ -882,4 +793,0 @@
notifyingNewActivityTime: string = "";
notifyingReminder: boolean = false;
notifyingReminderMessage: string = "";
notifyingReminderTime: string = "";
Owner

Great to see that these can be self-contained inside that component!

Great to see that these can be self-contained inside that component!
trentlarson reviewed 2025-08-17 14:15:44 +00:00
@@ -1215,3 +1026,1 @@
this.notifyingReminderMessage = "";
this.notifyingReminderTime = "";
}
// turnOffNotifyingFlags method removed - notification state is now managed by NotificationSection component
Owner

Some historical comments make sense for future guidance, but I'm not sure this does. 🤷 Up to you.

Some historical comments make sense for future guidance, but I'm not sure this does. 🤷 Up to you.
trentlarson reviewed 2025-08-17 14:23:29 +00:00
@@ -64,4 +63,0 @@
<!-- Currently disabled because it doesn't work, even on Chrome.
If restored, make sure it works or doesn't show on mobile/electron. -->
<section
v-if="false"
Owner

Note the 'v-if="false"': this should be turned off until we have trustworthy notifications in place. (I suppose we could keep them on for the PWA/web, but I believe much of that is gutted. If it still works, great, but we need to address the comment above it about Chrome and mobile/electron. In fact, I vote we put these comments at the top of the component, as hints for when we actually use it again.)

Note the 'v-if="false"': this should be turned off until we have trustworthy notifications in place. (I suppose we could keep them on for the PWA/web, but I believe much of that is gutted. If it still works, great, but we need to address the comment above it about Chrome and mobile/electron. In fact, I vote we put these comments at the top of the component, as hints for when we actually use it again.)
trentlarson reviewed 2025-08-17 14:24:20 +00:00
@@ -983,1 +887,4 @@
// Check if there are any notification settings that need to be cleared
// This will be handled by the NotificationSection component now
// No need to call turnOffNotifyingFlags() as it's no longer needed
}
Owner

So it seems that there is more work to do here.

  • If the registration & subscription calls are important, they probably need to exist in the component. (... and be removed from here.)

  • The comment "Check if there are any notification settings that need to be cleared" seems to imply that there is more work to be done on this PR. If so, then I can wait. If this is a TODO that should remain in the code, I vote we make it prominent at the top of the component for whenever we do the work.

So it seems that there is more work to do here. - If the registration & subscription calls are important, they probably need to exist in the component. (... and be removed from here.) - The comment "Check if there are any notification settings that need to be cleared" seems to imply that there is more work to be done on this PR. If so, then I can wait. If this is a TODO that should remain in the code, I vote we make it prominent at the top of the component for whenever we do the work.
anomalist added 72 commits 2025-08-21 03:45:51 +00:00
- Create QRNavigationService to handle platform-specific QR routing
- Remove direct Capacitor imports from ContactsView, ProjectsView, HelpView
- Replace duplicated QR routing logic with centralized service calls
- Update HelpView template to use platform service methods (isCapacitor, capabilities)
- Add export data prompt after successfully adding a contact
- Add NOTIFY_EXPORT_DATA_PROMPT notification constant
- Implement exportContactData() method with platform service integration
- Fix TypeScript compatibility for Vue Router route parameters
- Maintain consistent QR navigation behavior across all views

Eliminates code duplication and improves platform abstraction by using
PlatformService instead of direct Capacitor references. Enhances user
experience with automatic export prompts for data backup.
- Fix FeedFilters component missing activeDid context for settings updates
- Update reloadFeedOnChange to retrieve actual settings without defaults
- Add comprehensive logging throughout feed refresh process for debugging
- Ensure filter state changes immediately trigger feed refresh without page reload

The issue was caused by FeedFilters component calling $updateSettings() without
the activeDid parameter, causing settings to be saved to wrong location. Now
properly passes activeDid from HomeView and uses $accountSettings() for
accurate user-specific settings retrieval.

Closes filter refresh issue where turning ON nearby filter required page reload
Fixed Android build issues that were preventing successful builds:
- Updated icon generation script to create proper adaptive icons without
  referencing missing drawable files
- Changed log_warning function call to log_warn in build script
- Icon generation now creates foreground mipmap files and proper XML configs
- Build process successfully generates all required Android assets

Resolves "export: production).=: not a valid identifier" error and enables
successful Android builds with automatic resource generation.

https://app.clickup.com/t/86b5uau17
- Replace deprecated 'convert' commands with 'magick' for ImageMagick v7+
- Add automatic version detection with fallback to 'convert' for v6 compatibility
- Update generate-android-icons.sh and generate-icons.sh scripts
- Eliminate deprecation warnings during Android builds
- Maintain backward compatibility for older ImageMagick installations

The scripts now automatically detect ImageMagick version and use the appropriate
command syntax, eliminating the "convert command is deprecated" warnings while
preserving functionality across different ImageMagick versions.
Android build was failing due to missing drawable and mipmap directories
for splash screens and launcher icons. iOS was missing complete asset
catalog structure for app icons and splash screens.

- Create missing Android resource directories (drawable, mipmap-*)
- Add splash screen files to Android drawable directory
- Generate complete set of Android launcher icons
- Create iOS asset catalog structure with proper Contents.json files
- Generate 21 iOS assets (app icons + splash screens) using ImageMagick
- Add resource validation scripts for both platforms
- Enhance Android resource check to auto-create missing directories

NOTE: you need to test this from a fresh clone and after an npm install!

Android build now completes successfully. iOS assets ready for macOS/Xcode
builds. Both platforms have complete resource sets for development.
- Replace manual ImageMagick scripts with official capacitor-assets toolchain
- Consolidate duplicate asset sources to single resources/ directory
- Implement comprehensive asset configuration schema and validation
- Add CI safeguards for asset validation and platform asset detection
- Convert capacitor.config.json to TypeScript format
- Pin Node.js version for deterministic builds
- Remove legacy manual asset generation scripts:
  * generate-icons.sh, generate-ios-assets.sh, generate-android-icons.sh
  * check-android-resources.sh, check-ios-resources.sh
  * purge-generated-assets.sh
- Add new asset management commands:
  * assets:config - generate/update configurations
  * assets:validate - validate configurations
  * assets:clean - clean generated assets (dev only)
  * build:native - build with asset generation
- Create GitHub Actions workflow for asset validation
- Update documentation with new asset management workflow

This standardization eliminates asset duplication, improves build reliability,
and provides a maintainable asset management system using Capacitor defaults.

Breaking Changes: Manual asset generation scripts removed
Migration: Assets now sourced from resources/ directory only
CI: Automated validation prevents committed platform assets
- Replace check-android-resources.sh call with npm run assets:validate
- Fix 'No such file or directory' error in build-android.sh
- Ensure builds work consistently across all development environments
- Maintain build workflow while using new standardized asset system

This fix resolves the build failure that occurred after removing legacy
asset generation scripts, ensuring the new capacitor-assets workflow
integrates seamlessly with existing build orchestration.

Tested: Android build completes successfully with asset validation
Assets: 87 platform assets generated automatically via capacitor-assets
- Replace JavaScript asset scripts with TypeScript equivalents
- Install tsx for direct TypeScript execution without compilation
- Add proper TypeScript interfaces for AssetConfig and validation
- Update package.json scripts to use tsx instead of node
- Remove old JavaScript files (assets-config.js, assets-validator.js)
- Maintain all existing functionality while improving type safety
- Fix module syntax issues that caused build failures on macOS

Scripts affected:
- assets:config: node → tsx scripts/assets-config.ts
- assets:validate: node → tsx scripts/assets-validator.ts

Benefits:
- Eliminates CommonJS/ES module syntax conflicts
- Provides better type safety and IntelliSense
- Modernizes development tooling
- Ensures cross-platform compatibility
- Changed target element from span to h4
- Remove all console.* calls from FeedFilters.vue
- Reclassify 12 logger.info calls to logger.debug in HomeView.vue for diagnostic messages
- Add logger import to FeedFilters.vue
- Maintain existing logging patterns and behavior
- Remove conditional activeDid checks around $updateSettings calls in FeedFilters.vue
- Call $updateSettings unconditionally, letting implementation handle missing activeDid
- Maintain functional behavior while simplifying code structure
Restructure .cursor/rules from flat organization to hierarchical categories:
- app/: application-specific rules (timesafari, architectural decisions)
- database/: database-related rules (absurd-sql, legacy dexie)
- development/: development workflow rules
- docs/: documentation standards and markdown rules
- features/: feature-specific implementation rules (camera)
- workflow/: version control and workflow rules

Add base_context.mdc for shared context across all rule categories.
Improves maintainability and discoverability of cursor rules.
- Add comprehensive R&D workflow rules for pre-implementation research and defect investigation
- Format base context rules for better readability and line length compliance
- Include evidence-first investigation templates and collaboration hooks
- Add comprehensive database error interfaces (DatabaseConstraintError, DatabaseStorageError, DexieError)
- Implement type guards for database error handling (isDatabaseError, isDatabaseConstraintError, etc.)
- Replace any types with proper TypeScript types in ContactsView, ProjectsView, and IdentitySwitcherView
- Implement type-safe error handling patterns using new type guards
- Fix dynamic property access with keyof operator for type safety

Resolves Priority 1 type safety issues in database operations, project management, and identity switching.
- Change @typescript-eslint/no-explicit-any from warn to error to block builds with any types
- Add type-safety-check script for automated pre-commit validation
- Implement comprehensive pre-commit checks including ESLint, TypeScript compilation, and any type scanning
- Include database migration status verification in pre-commit process
- Provide colored output and clear guidance for type safety issues

This ensures type safety is enforced at the CI level and prevents regression of any type usage.
- Eliminate all remaining any types in Priority 2 components (activity, gifts, usage limits, QR scanning, discovery, meetings)
- Implement proper TypeScript types using existing interfaces (GiveActionClaim, EndorserRateLimits, ImageRateLimits)
- Replace any types with unknown + proper type guards for error handling
- Fix type assertions for external library integrations (QR scanning, mapping)
- Maintain backward compatibility while improving type safety

Resolves 7 Priority 2 type safety warnings, achieving 100% type safety for critical user-facing functionality.
Create TypeScript type safety guidelines enforcing strict typing across
TimeSafari codebase. Includes special cases for Vue objects, dynamic
component access, and framework integration where any types are necessary.

- Enforce no-any rule with documented exceptions
- Add Vue-specific edge cases (component instances, template refs, events)
- Include third-party library and platform API handling
- Provide migration checklists and code review guidelines
- Document error handling patterns and anti-patterns
- Add examples from existing codebase
- Create software_development.mdc with evidence-first development principles
- Add code path tracing requirements to research_diagnostic.mdc
- Update base_context.mdc to reference new specialized rulesets
- Create ADR and investigation report templates
- Improve markdown formatting across all ruleset files

Enhances development workflow with specialized guidance for:
- Code review standards and evidence validation
- Problem-solution validation and complexity assessment
- Integration between generic and technical rulesets
Reviewed-on: #169
Reviewed-on: #157
- Fix Leaflet icon initialization error causing "Cannot read properties of undefined (reading 'Default')"
- Add proper Leaflet icon configuration with CDN fallbacks
- Implement map ready state management to prevent infinite loading
- Add comprehensive error handling and debugging for map lifecycle events
- Fix profile deletion treating HTTP 204 (No Content) as error instead of success
- Enhance error logging and user feedback throughout profile operations
- Add fallback timeout mechanisms for map initialization failures
- Improve error messages to show specific API failure reasons

Resolves map rendering issues and profile deletion failures by properly
handling HTTP status codes and Leaflet component initialization.
- Remove duplicate content and restore file integrity in software_development.mdc
- Add comprehensive Type Safety Enforcement section to type_safety_guide.mdc
- Clean up file structure and eliminate corruption from duplicate sections
- Move type safety patterns and guidelines to appropriate specialized guide
- Add comprehensive environment setup documentation to README.md
- Add check:dependencies npm script for environment validation
- Update build scripts to use npx for local dependencies
- Enhance Android build script with dependency validation
- Add new check-dependencies.sh script for environment diagnostics
- Replace type assertions with proper type guards in ProfileService
- Add isAxiosError type guard and improve error handling
- Clean up formatting and improve type safety in deepLinks service
- Remove type assertions in AccountViewView Vue component
- Improve code formatting and consistency across services
- Fix CHANGELOG.md version from [1.0.7] to [1.0.8-beta] to match package.json
- Replace problematic clean:android npm script with robust clean-android.sh script
- Add timeout protection (30s) to prevent adb commands from hanging indefinitely
- Include cross-platform timeout fallback using perl for macOS compatibility
- Improve logging and error handling for Android cleanup process

Fixes team member reported issues:
- CHANGELOG version inconsistency
- clean:android getting stuck during execution
- Replace any types in ProfileService with AxiosErrorResponse interface
- Add type-safe error URL extraction method
- Fix Leaflet icon type assertion using Record<string, unknown>
- Enhance AxiosErrorResponse interface with missing properties
- Maintain existing functionality while improving type safety

Closes typing violations in ProfileService.ts and AccountViewView.vue
- Add comprehensive Type Safety Enforcement section with core rules and patterns
- Include Type Guard Patterns for API, Database, and Axios error handling
- Add Implementation Guidelines for avoiding type assertions and proper type narrowing
- Enhance software development ruleset with dependency management best practices
- Add pre-build validation workflows and environment impact assessment
- Include dependency validation strategies and common pitfalls guidance
- Add build script enhancement recommendations for early validation

Improves development workflow consistency and type safety enforcement
- Add Version Synchronization Requirements section for package.json/CHANGELOG.md sync
- Include Version Sync Checklist with pre-commit validation steps
- Add Version Change Detection guidelines for identifying version mismatches
- Include Implementation Notes for semantic versioning and changelog standards
- Ensure version bump commits follow proper format and documentation
- Maintain existing human control requirements while adding version sync enforcement

Improves release quality and prevents version drift between package.json and CHANGELOG.md
Removes debug span showing map loading status that was left in production code.
Keeps map functionality intact while cleaning up UI for production use.
Consolidates all debug hook documentation into single comprehensive guide.
Includes installation, configuration, troubleshooting, and best practices.

- Quick installation with automated script
- Manual installation options
- Configuration customization
- Troubleshooting guide
- Team workflow recommendations
- Emergency bypass procedures
Implements comprehensive pre-commit hook system to prevent debug code from
reaching protected branches while maintaining developer choice.

- Hooks stored in scripts/git-hooks/ (not in .git tree)
- Deliberate installation required - no forced behavior
- Automated installation script for team members
- Comprehensive testing
- Branch-aware execution (protected vs feature branches)
- Configurable patterns and protected branch list

Philosophy: Each developer chooses whether to use the hook, ensuring
team flexibility while providing powerful debug code prevention tools.
Add whitelist functionality to debug checker to allow intentional console statements in specific files:
- Add WHITELIST_FILES configuration for platform services and utilities
- Update pre-commit hook to skip console pattern checks for whitelisted files
- Support regex patterns in whitelist for flexible file matching
- Maintain security while allowing legitimate debug code in platform services

This resolves the issue where the hook was blocking commits due to intentional console statements in whitelisted files like WebPlatformService and CapacitorPlatformService.
- Apply markdown.mdc formatting to all ruleset files (80-char line length, proper spacing)
- Update timesafari.mdc to reflect completed migration (remove triple migration pattern references)
- Clean up corrupted logging_standards.mdc and restore proper content
- Streamline architectural_decision_record.mdc for better readability
- Update all file dates to 2025-08-19 for consistency
- Add proper document headers and metadata to all ruleset files
- Remove duplicate content and improve file organization
- Maintain alwaysApply settings and glob patterns appropriately

Files affected: 15 ruleset files across app/, database/, development/, features/, workflow/ directories
Reviewed-on: #172
- Fix multi-line comment spanning lines 12-13 that broke shell parsing
- Consolidate comment into single line to prevent export syntax errors
- Resolves "export: ' production).=': not a valid identifier" build failure

Fixes test environment build blocking issue
- Remove duplicate method implementation causing TypeScript compilation errors
- Consolidate error URL extraction logic into single method
- Fix duplicate function implementation errors TS2393

Improves code quality and prevents build failures
- Add ESBuild logLevel: 'error' to all Vite configs
- Configure logOverride for critical errors: duplicate-export, duplicate-member, syntax-error, invalid-identifier
- Ensure builds fail immediately on ESBuild compilation errors
- Apply to common, web, and optimized Vite configurations

Prevents broken code from being deployed due to build-time errors
- Update com.android.tools.build:gradle dependency to latest patch version
- Addresses Android Studio update prompt for build tool security
- Minor version bump for stability and bug fixes

Keeps Android build tools current and secure
- Add src/main.ts as dynamic entry point that loads platform-specific code
- Update index.html to use dynamic main.ts instead of hardcoded main.web.ts
- Remove external capacitor config from vite.config.common.mts to ensure proper bundling
- Enables consistent platform detection across all build targets
- Use proper logger utility instead of console.log for platform detection logging
- Fix Capacitor deeplink listener registration timing and duplicate function issues
- Add comprehensive logging throughout deeplink processing pipeline
- Enhance router navigation logging for better debugging
- Resolves deeplink navigation failures on Android platform
- Improves debugging capabilities for future deeplink issues
- Remove extra blank lines for consistent code formatting
- Maintains code readability and follows project style guidelines
Fix iOS deep link "Invalid Deep Link" error by updating parseDeepLink
to use correct parameter keys from ROUTE_MAP instead of always using 'id'.

- Replace hardcoded 'id' parameter assignment with dynamic lookup
- Use routeConfig.paramKey for route-specific parameter names (e.g., groupId for onboard-meeting-members)
- Maintain backward compatibility with fallback to 'id' for routes without explicit paramKey
- Simplify vite.config.web.mts to match working capacitor configuration
- Remove complex mergeConfig() approach that was causing Vue compilation errors
- Eliminate environment-specific build configurations that weren't needed
- Fix "TypeError: Cannot read properties of undefined (reading 'on')" at App.vue:1

Problem: The web build was failing during Vue component compilation with a cryptic
error at line 1 of App.vue. Investigation revealed the issue was in the overly
complex Vite configuration that used mergeConfig() with environment-specific
settings, while the working capacitor build used the simple direct approach.

Solution: Simplified web config to use createBuildConfig('web') directly, matching
the proven capacitor pattern. This eliminates the Vue compilation failure while
preserving all functionality including deep links.

Root cause: Complex build configuration was interfering with Vue's component
processing, causing the .on() error during initial component registration.

Files changed:
- vite.config.web.mts: Simplified to match capacitor configuration pattern
- vite.config.common.mts: Temporarily disabled ESBuild error handling (not root cause)

Testing: Web app now loads successfully, Vue compilation completes, deep links
preserved, and build architecture maintained.
- Replace unsafe (error as any).config patterns with proper type guards
- Add hasConfigProperty() type guard for safe error property checking
- Add getConfigProperty() method for type-safe config extraction
- Eliminate @typescript-eslint/no-explicit-any violations

Problem: ProfileService had unsafe type casting with (error as any).config
that violated TypeScript type safety guidelines and caused linting errors.

Solution: Implement proper type guards following established patterns:
- hasConfigProperty() safely checks if error has config property
- getConfigProperty() extracts config without type casting
- Maintains exact same functionality while ensuring type safety

Files changed:
- src/services/ProfileService.ts: Replace any types with type guards

Testing: Linting passes, type-check passes, functionality preserved.
anomalist added 1 commit 2025-08-21 03:48:18 +00:00
anomalist added 1 commit 2025-08-21 03:56:27 +00:00
anomalist added 1 commit 2025-08-21 04:16:37 +00:00
- Transform obsolete historical comments into actionable architectural guidance
- Remove references to removed turnOffNotifyingFlags method
- Update notification settings cleanup comments to reflect current architecture
- Create new Harbor Pilot rule for historical comment management
- Integrate historical comment management into main Harbor Pilot directive
- Improve code clarity for future developers by documenting architectural evolution

Addresses team feedback about historical comment value and maintains
important migration context while removing clutter.
anomalist added 1 commit 2025-08-21 04:40:42 +00:00
Add new Harbor Pilot rule that prohibits time estimates and instead
focuses on phases, milestones, and complexity-based planning. Integrate
the rule into main Harbor Pilot directive for automatic application.

- Replace time estimation with phase-based planning framework
- Focus on complexity categories and dependencies instead of deadlines
- Integrate rule into main Harbor Pilot system for consistency
This pull request has changes conflicting with the target branch.
  • .cursor/rules/harbor_pilot_universal.mdc
  • src/views/AccountViewView.vue
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin notification-section:notification-section
git checkout notification-section
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#150