- Replace placeholder plan IDs with explicit warnings
- Change from test_project_X to PLACEHOLDER_ID_X
- Add validation to prevent seeding with placeholders
- Add helpful error messages with usage examples
- Add comprehensive guide for getting valid plan IDs
- Methods: Create projects, query database, check account settings
- Format examples: UUID, hash, custom formats
- Step-by-step instructions for each method
- Troubleshooting common issues
- Update test-user-zero.ts with placeholder warnings
- Clear instructions on how to get real plan IDs
- Links to documentation
- Notes about plan ID format variations
- Improve test server startup
- Warn when using placeholder IDs
- Allow plan IDs via command line argument
- Provide guidance on updating config
The previous test_project_X IDs were not valid for real TimeSafari
databases. Users must now provide actual plan handle IDs from their
TimeSafari setup, making testing more realistic and avoiding silent
failures with invalid IDs.
- Add seed-test-projects.js utility script
- Generates test project data matching API schema
- Creates projects with handleIds, jwtIds, planSummary, previousClaim
- Supports export, seed, and generate commands
- Can seed projects to localhost API server
- Add test-api-server-with-seed.js
- Standalone Express server for localhost testing
- Auto-seeds test projects on startup
- Implements /api/v2/report/plansLastUpdatedBetween endpoint
- Includes debugging endpoints (/api/test/projects, /api/test/health)
- Ready to use immediately without database setup
- Update localhost testing guide
- Add seeding instructions and examples
- Document test API server usage
- Explain how to integrate with existing API servers
This enables testing prefetch functionality even when your localhost
API has no project data. The test server can be started immediately
and provides 5 seeded test projects ready for prefetch queries.
Enhanced build-native.sh to automatically build plugin and test app together:
- Detects test app directory presence
- Builds plugin AAR first
- Removes stale AAR from test app's libs directory
- Ensures symlink is in place for fresh plugin source
- Builds test app with latest plugin code
- Provides install command with APK path
This automates the manual AAR copying workflow, ensuring test app
always uses the latest plugin build without stale artifacts.
The build process now:
1. Builds TypeScript interface
2. Builds plugin AAR
3. Removes any stale AAR from libs/
4. Creates/verifies symlink to plugin source
5. Builds test app APK
6. Provides install command
Benefits:
- No manual file copying required
- Fresh plugin code always included
- Single command to rebuild everything
- Add null safety check to permission callback to prevent NPE
- Fix fetch time calculation bug that caused double subtraction
- scheduleFetch() now accepts pre-calculated fetchTime directly
- Calculate scheduledTime back from fetchTime for worker data
- Add structured logging (DN|FETCH_SCHEDULING) for better traceability
The permission callback was crashing with NullPointerException when
Capacitor passed a null call parameter. The prefetch scheduling had a
logic error where fetchTime was calculated twice - once in the plugin
and once in the fetcher, causing 10-minute delays instead of 5-minute.
Both issues are now fixed and verified working:
- Permission callback handles null gracefully
- Prefetch schedules correctly 5 minutes before notification
- WorkManager job fires at the correct time
- All structured logs appear in logcat
Closes prefetch scheduling investigation.
- Fix sed -i syntax differences between macOS and Linux
- macOS requires empty string after -i flag: sed -i '' 'pattern' file
- Linux uses: sed -i 'pattern' file
- Add OSTYPE detection to handle both platforms correctly
- Fixes build script failures on macOS systems
Resolves: sed command a expects \ followed by text error on macOS
- Add daily-notification-test.sh for basic notification testing
- Add daily-notification-test.py for Python-based testing
- Add reboot-test.sh for automated reboot recovery testing
- Include comprehensive error handling and logging
- Add colored output for better user experience
- Support for different testing scenarios and edge cases
- Include ADB command validation and device connectivity checks
Scripts provide:
- Automated notification scheduling and verification
- Reboot recovery testing with proper timing
- Permission management testing
- Comprehensive logging and error reporting
- Cross-platform compatibility (bash and Python)
These scripts enable automated testing of the complete notification
system including boot receiver and app startup recovery mechanisms.
- Add detailed inline documentation in build-native.sh explaining the problem, why it happens, and the solution
- Update fix-capacitor-build.sh with comprehensive header documentation
- Include clear explanations of when the fix gets overwritten and how to restore it
- Add user-friendly output with emojis and clear messaging
- Document the automatic fix process with step-by-step explanations
This provides complete transparency about what the scripts do and why,
making it easy for developers to understand and maintain the fix.
- Create fix-capacitor-build.sh script to restore fixes after Capacitor operations
- Update build-native.sh to automatically apply fix when needed
- Add warnings to BUILDING.md about auto-generated file risks
- Document which Capacitor commands will overwrite manual fixes
This protects against losing the capacitor.build.gradle fix when running
npx cap sync, npx cap update, or other Capacitor CLI commands.
- Detect when this is a plugin development project vs full Capacitor app
- Skip Android test app build when Capacitor integration files are missing
- Provide helpful warnings about plugin development workflow
- Allow successful build completion for plugin source code only
This fixes the Gradle build failure when trying to build a plugin
development project that doesn't have a properly initialized test app.
- Update package.json with native-first architecture description
- Add new build scripts for platform-specific builds
- Update dependencies to align with TimeSafari PWA requirements
- Add development scripts for environment checking and setup
- Update package keywords to reflect native-first focus
- Add bundle size checking and API change detection
- Update version to 2.2.0 with comprehensive feature set
Dependencies: Capacitor 6.2.1, TypeScript 5.2.2, Jest 29.7.0
- Update AAR file verification path from 'build/outputs/aar/daily-notification-release.aar'
to 'capacitor-cordova-android-plugins/build/outputs/aar/capacitor-cordova-android-plugins-release.aar'
- Fixes build script error where it couldn't find the generated AAR file
- Android builds now complete successfully without false error messages
The build script was looking for a non-existent file path, causing the build to fail
even though the Android compilation was successful. This aligns the verification
path with the actual Gradle output structure.
- Add build scripts for Android and iOS platforms
- Remove duplicate web implementation (src/web.ts)
- Add proper TypeScript configuration
- Add module documentation to index.ts
- Clean up package.json scripts
This commit improves the project structure and build process by:
1. Adding dedicated build scripts for native platforms
2. Removing redundant web implementation
3. Adding proper TypeScript configuration with strict mode
4. Improving code documentation
5. Organizing package.json scripts
The changes maintain backward compatibility while improving
the development experience and code quality.