Commit Graph

189 Commits

Author SHA1 Message Date
southseact-3d
5aa278f7ee Fix Dockerfile: Run build from correct directory with better error handling 2026-02-16 16:57:42 +00:00
southseact-3d
1465f3df41 Fix Dockerfile: Use multi-stage build for OpenCode
- Added builder stage with all build dependencies
- Isolated build process to prevent failures in final stage
- Retry mechanism for bun install
- Copy only built binary to final image
2026-02-16 16:47:55 +00:00
southseact-3d
49983fbc3c Build OpenCode from source in Docker and remove broken session token queries
- Dockerfile: Build OpenCode CLI from source during Docker build instead of downloading from GitHub releases
- Disabled GitHub Actions workflow that was failing to create releases
- Removed getOpencodeSessionTokenUsage function that tried non-existent CLI commands (session info/usage/show)
- Token tracking now relies on 3 layers: result extraction, streaming capture, and estimation
2026-02-16 16:38:22 +00:00
southseact-3d
4af4dc114f fix 1 2026-02-16 15:56:52 +00:00
southseact-3d
c2e5980a8b added scroll to bottom template 2026-02-16 13:42:05 +00:00
southseact-3d
9a325df739 Fix Electron build publish config and remove release steps from workflows 2026-02-16 12:11:42 +00:00
southseact-3d
8d89250797 Fix OpenCode CLI workflow to only trigger on relevant paths 2026-02-16 12:07:12 +00:00
southseact-3d
d6e2af3a29 Rename to Plugin Compass, add mobile onboarding/signin, implement self-update for desktop, and fix workflow paths 2026-02-16 12:05:30 +00:00
southseact-3d
63698e1d19 Fix missing closing brace in OPENCODE_EXTRA_MCP_SERVERS if block 2026-02-16 12:03:49 +00:00
southseact-3d
df93012130 Fix Capacitor dependencies - use built-in HTTP instead of separate plugin 2026-02-16 09:46:35 +00:00
southseact-3d
14f0e18ad4 Fix workflow cache paths for missing package-lock files 2026-02-16 09:44:05 +00:00
southseact-3d
ca4bc9184d Convert Windows app to Electron and add Android Capacitor app with CI builds 2026-02-16 09:40:31 +00:00
Developer
14f59c2f56 Fix builder plan message display and error handling
- Strip double stars (**) and double hashtags (##) from plan message displayContent in both client and server
- Fix server restart error replacing plan message by skipping error state for plan messages
- Fix rate limiting regex pattern to use proper global flag
2026-02-16 08:40:58 +00:00
Developer
816e72fb03 fix: disable husky during CI build 2026-02-15 19:40:41 +00:00
southseact-3d
3e96a41e39 fix: prevent multiple HTTP requests for Chutes AI provider
Chutes AI counts each HTTP API request separately. The existing fix using
stepCountIs(1) only limited the Vercel AI SDK's internal loop, but the
outer while(true) loops in processor.ts and prompt.ts continued to make
additional HTTP requests after tool execution.

This fix:
- Returns singleStepTools flag from LLM.stream() to signal single-step mode
- Breaks out of processor.ts inner loop after one iteration for Chutes
- Breaks out of prompt.ts outer loop after one iteration for Chutes

This ensures only one HTTP request is made per user message for providers
like Chutes that bill per request.
2026-02-15 16:38:07 +00:00
southseact-3d
dafd3c796d Add admin token override feature for user accounts
- Add tokenOverride field to token usage bucket
- Create POST /api/admin/accounts/tokens endpoint for setting manual token limits
- Update admin accounts page to display token usage and override status
- Add 'Set Tokens' button to manually override user token limits for the month
- Override takes precedence over plan-based limits when set
2026-02-15 16:19:06 +00:00
southseact-3d
9973c3511c fix: remove message status chip for plan messages
Hide the status indicator (queued, running, done, etc.) from user messages
in the builder UI when the message is a plan message (OpenRouter/non-OpenCode
messages). Regular build messages still show their status as before.
2026-02-15 13:58:50 +00:00
Developer
04780632e8 fix: show undo/redo buttons when server restart error occurs 2026-02-15 12:50:56 +00:00
Developer
6bcdb2b739 Migrate test checkout page to inline Dodo Payments checkout with theme customization
- Replace modal-based checkout with true inline checkout embedded in page layout
- Implement split layout: payment form on left, package selection + order summary on right
- Add real-time order summary sync via checkout.breakdown events
- Apply comprehensive theme customization matching app design (Shopify green, proper colors)
- Add loading states and empty state for better UX
- Use ES modules with proper DodoPayments SDK import
2026-02-15 10:58:15 +00:00
Developer
cea30dc84c Fix admin test checkout email validation - ensure valid email format is sent to Dodo Payments 2026-02-14 21:36:55 +00:00
Developer
a6a5d8f7a0 Fix ReferenceError: handleAdminTopupOptions is not defined
- Added missing closing brace for handleTopupConfirm function
- Removed extra closing brace after handleAdminMe function
- Admin functions (handleAdminTopupOptions, handleAdminTopupCheckout, handleAdminTopupConfirm) were incorrectly nested inside handleTopupConfirm scope, making them inaccessible to the router
2026-02-14 20:38:22 +00:00
Developer
4fa0a1b737 Fix ReferenceError: handleAdminTopupOptions is not defined by removing unnecessary await 2026-02-13 19:43:11 +00:00
Developer
180990bea5 fix: standardize contact email to info@plugincompass.com and add await to topup handlers 2026-02-13 15:02:31 +00:00
Liam Hetherington
cd76767dc2 Delete opencode/packages/opencode/src/session/prompt/wordpress-plugin-subsequent.txt 2026-02-13 13:20:53 +00:00
Liam Hetherington
ca6fcba172 Update description in base.txt to include 'plugin compass' 2026-02-13 13:19:02 +00:00
Liam Hetherington
4a386bce98 Delete anthropic-20250930.txt instructions
Removed detailed instructions and guidelines for PluginCompass.
2026-02-13 13:16:39 +00:00
southseact-3d
af30843f05 fix: add missing Map declarations (loginAttempts, adminLoginAttempts, apiRateLimit, csrfTokens)
Fixed ReferenceError: apiRateLimit is not defined that was causing
internal server errors on all pages. Added 4 missing Map variable
declarations that are used throughout the codebase for rate limiting
and CSRF protection.
2026-02-13 11:13:07 +00:00
southseact-3d
55ee592379 fix: make HTTP check authoritative in healthcheck for container compatibility
Process detection fails in containers due to missing privileged tools
(ss -p requires root, lsof often not installed). HTTP health endpoint
is the reliable indicator of service health, so port/process checks
are now informational only.
2026-02-13 09:39:58 +00:00
southseact-3d
098e971151 Fix syntax error: remove orphan object definition after sendEmail function 2026-02-13 09:18:11 +00:00
southseact-3d
df3a8cdf43 mailpilot sending 2026-02-12 19:35:55 +00:00
southseact-3d
6c09b70317 fix: improve plan change UX with card charge confirmation and fix paid-to-free downgrade 2026-02-12 19:06:17 +00:00
southseact-3d
16f620cccb added internal mcp for the wp verify scripts 2026-02-12 17:01:18 +00:00
southseact-3d
49747d08db fix: prevent duplicate Dodo customers and handle multiple subscriptions per email
Comprehensive fixes to prevent customer ID mismatches:

1. **Checkout creation now passes customer_id** (lines 13669, 13064, 13503):
   - All checkouts (subscription, topup, PAYG) now call ensureDodoCustomer() first
   - Pass existing customer_id to checkout body to prevent Dodo from creating duplicates
   - Added customerId to metadata for tracking

2. **Subscription confirmation validates customer consistency** (line 13843):
   - Logs warning when checkout returns different customer_id than stored
   - Tracks which customer_id was used in checkout metadata
   - Prevents silent customer ID overwrites

3. **ensureDodoCustomer handles multiple customers per email** (line 6774):
   - Logs warning when multiple customers found for same email
   - Checks ALL customers for active subscriptions
   - Selects customer with active subscriptions if multiple exist
   - Returns first customer only if no active subscriptions found

4. **Added missing return statements** (lines 12417, 12448):
   - Prevents double response errors after successful plan changes

This ensures that:
- New subscriptions use existing customers instead of creating duplicates
- Plan changes work correctly even with multiple subscriptions
- Customer ID mismatches are detected and logged
- The correct customer (one with active subscriptions) is always used
2026-02-12 12:06:49 +00:00
southseact-3d
d61fa3d621 fix: add return statements after successful plan changes to prevent double response
- Added return statement after successful paid-to-free cancellation (line 12417)
- Added return statement after successful paid-to-paid plan change (line 12448)
- Prevents 'Cannot write headers after they are sent' error
- Each plan change now returns immediately with the updated account data
2026-02-12 11:58:35 +00:00
southseact-3d
1e30e07ed5 fix: remove hardcoded subscription ID and rely on API queries
- Removed hardcoded subscription ID from code
- Rely on API queries to find subscriptions by customer or through fallback search
- Added proper logging to diagnose customer/subscription mismatches
2026-02-12 11:51:51 +00:00
southseact-3d
8e937a6ff4 debug: try fetching subscription directly by ID to check customer mismatch
- Add direct API call to fetch subscription sub_0NYKZRvba3g5KJfp8R5jp
- Log customer ID comparison to detect mismatches
- Update user record if subscription belongs to different customer
- This will help identify if duplicate customers exist in Dodo
2026-02-12 11:50:14 +00:00
southseact-3d
2268a0e649 debug: log full API response to diagnose empty subscription results 2026-02-12 11:48:58 +00:00
southseact-3d
001993d0bc fix: query all subscriptions without status filter for customers with multiple subs
- Query ALL subscriptions for customer without status filter first
- This handles customers with multiple subscriptions across different statuses
- Returns first active subscription found, or most recent if none active
- Added detailed logging to show all subscription IDs and statuses found
- Fallback to check individual statuses including cancelled/expired
2026-02-12 11:45:53 +00:00
southseact-3d
2a603549f4 debug: add detailed logging for customer and subscription lookup
Add comprehensive DEBUG logs to trace through:
- Customer lookup by email (request and response details)
- Subscription lookup by customer ID (for each status)
- Entry point when plan change is initiated

This will help identify exactly where the lookup is failing.
2026-02-12 11:36:52 +00:00
southseact-3d
d82dcfd5e4 fix: improve customer lookup to prevent duplicate customers in Dodo
- Modified ensureDodoCustomer() to query existing customers by email before creating new ones
- This prevents duplicate customer records when dodoCustomerId is missing from database
- Added logging for both found existing customers and new customer creation
- Updated subscription lookup to check multiple statuses (active, pending, on_hold)
- Should resolve paid-to-paid and paid-to-free plan change issues for users missing subscription IDs
2026-02-12 11:30:52 +00:00
southseact-3d
ae871df0a0 fix: resolve subscription ID lookup and checkout URL issues
- Fix getBaseUrl() ReferenceError by changing to resolveBaseUrl(req) for free-to-paid upgrades
- Add subscription lookup by customer email when dodoSubscriptionId is missing
- Log critical issues when paid users have no subscription ID in database or Dodo
- Return clear error message to contact support when subscription cannot be found
- Prevent silent failures in plan changes from settings page
2026-02-12 11:09:45 +00:00
southseact-3d
c762470fa9 Align topup.html fonts with home.html: remove Space Grotesk, use Inter only 2026-02-12 10:49:09 +00:00
Liam Hetherington
f61ade810a Merge pull request #24 from southseact-3d/codex/fix-multiple-request-counting-issue
Limit tool-run loop for Chutes-like OpenAI routes and add regression test
2026-02-12 09:41:22 +00:00
Liam Hetherington
6a133b3038 Fix Chutes single-step tool loop detection for OpenAI-compatible routes 2026-02-12 09:41:03 +00:00
Liam Hetherington
b313994578 Delete Chutes AI Tool Call Issue Plan document
Removed detailed analysis and proposed solutions for the Chutes AI tool call counting issue.
2026-02-12 09:13:53 +00:00
southseact-3d
e2abb2ee98 fix 2 2026-02-11 20:16:01 +00:00
southseact-3d
a66c983360 Fix topup page header styling to match settings.html 2026-02-11 20:12:55 +00:00
southseact-3d
7d7388f571 Fix user profile dropdown z-index to appear above messages 2026-02-11 19:31:57 +00:00
southseact-3d
0513000a9e Fix builder page layout: make new chat and history buttons sticky at top on desktop
- Moved sticky positioning from mobile-only to global CSS for .top-left-actions

- Buttons now stay fixed at top above content on all screen sizes

- Includes various other app updates (version management, server improvements)
2026-02-11 19:23:23 +00:00
southseact-3d
e2a2dff301 Fix topup page: resolve JS error, improve styling, remove redundant buttons 2026-02-11 18:27:02 +00:00