Commit Graph

83 Commits

Author SHA1 Message Date
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
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
southseact-3d
277ee351bf Fix redeclaration of const userChip in feature-requests.html 2026-02-11 18:20:03 +00:00
Liam Hetherington
382a4abcb8 Merge branch 'main' into copilot/implement-secure-database-setup 2026-02-11 15:17:40 +00:00
southseact-3d
5d91c86f90 Add Cohere as a provider for build messages in admin panel
- Add 'cohere' to DEFAULT_PROVIDERS and PLANNING_PROVIDERS arrays in admin.js
- Add Cohere option to provider limits dropdown in admin.html
- Add 'cohere' to DEFAULT_PROVIDER_SEEDS, PLANNING_PROVIDERS, and KNOWN_USAGE_PROVIDERS in server.js

Cohere was already integrated in the opencode backend (SDK installed, provider registered, icons defined). These changes make it available in the admin panel for build message configuration.
2026-02-11 13:25:16 +00:00
southseact-3d
71c1677932 chore: remove excessive debug logging from ensureOpencodeConfig 2026-02-11 12:03:16 +00:00
southseact-3d
d2640eee5d fix: extract provider from model name (e.g., chutes/model-name)
- Parse model names like 'chutes/deepseek-ai/DeepSeek-V3.2-TEE'
- Extract provider prefix before '/' to detect chutes, cerebras, etc.
- This fixes provider detection when admin panel sets wrong provider
2026-02-11 11:49:43 +00:00
southseact-3d
f1fb336f4d debug: log all models and filter for chutes models 2026-02-11 11:44:48 +00:00
southseact-3d
b85cc73a4d fix: handle both string and object formats in providers array
- Support providers as array of strings: [opencode, chutes]
- Support providers as array of objects: [{provider: opencode}]
- This fixes provider detection for Chutes and other providers
2026-02-11 11:41:22 +00:00
southseact-3d
bddc710a90 debug: add detailed logging for adminModels and provider detection
- Log adminModels count and sample data
- Log CHUTES_API_KEY status and prefix
- Log detected providers from adminModels
2026-02-11 11:37:06 +00:00
southseact-3d
3ec9177082 fix: load adminModels before sessions in bootstrap sequence
- Move loadAdminModelStore() before loadState() in bootstrap()
- This ensures adminModels is available when ensureOpencodeConfig is called
- Fixes issue where Chutes provider was not being configured
2026-02-11 11:27:43 +00:00
southseact-3d
18d9e18978 debug: add detailed logging for Chutes API calls
- Log API key prefix to verify key is loaded
- Log full error response from Chutes API
- Log success count when models are fetched
2026-02-11 11:20:04 +00:00
southseact-3d
49092c3229 fix: ensure adminModels is loaded before checking providers in ensureOpencodeConfig
- Add check to load adminModels if not already loaded
- Add error handling for models.dev fetch failures
- Log provider source (models.dev vs built-in) for debugging
2026-02-11 11:18:56 +00:00
southseact-3d
17792d39a0 feat: dynamic provider model loading from models.dev
- Add fetchModelsDevProviderModels() function with 1-hour caching
- Update ensureOpencodeConfig() to dynamically load all models for configured providers
- Support Chutes, Cerebras, Groq, Google, and Nvidia providers
- Only fetch models for providers actually used in adminModels
- Cache models.dev data to reduce API calls and improve performance

This allows any model from models.dev to work when added in the admin panel,
instead of requiring hardcoded model definitions.
2026-02-11 10:53:37 +00:00
southseact-3d
d0105ff967 fix: add DeepSeek V3.2 TEE model to Chutes provider config with baseURL 2026-02-11 10:44:48 +00:00
Liam Hetherington
633f005f6c Merge pull request #22 from southseact-3d/codex/show-undo-and-redo-buttons-with-zero-output
Show builder undo/redo controls when message has zero output
2026-02-11 10:26:12 +00:00
Liam Hetherington
6cc4258d75 Show undo/redo controls even when builder output is empty 2026-02-11 09:46:54 +00:00
Liam Hetherington
e6485c6bbf Merge pull request #20 from southseact-3d/dependabot/npm_and_yarn/chat/npm_and_yarn-0d7ef37a24
Bump multer from 1.4.5-lts.2 to 2.0.2 in /chat in the npm_and_yarn group across 1 directory
2026-02-11 09:43:07 +00:00
southseact-3d
1ce02060e8 fix: pass provider API keys (CHUTES, GROQ, GOOGLE, NVIDIA) to OpenCode CLI execution environment 2026-02-11 09:04:15 +00:00
dependabot[bot]
c0eae5f3b4 Bump multer in /chat in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the /chat directory: [multer](https://github.com/expressjs/multer).


Updates `multer` from 1.4.5-lts.2 to 2.0.2
- [Release notes](https://github.com/expressjs/multer/releases)
- [Changelog](https://github.com/expressjs/multer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/expressjs/multer/compare/v1.4.5-lts.2...v2.0.2)

---
updated-dependencies:
- dependency-name: multer
  dependency-version: 2.0.2
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-10 21:23:34 +00:00
southseact-3d
566442327a Fix: Add Chutes and Cerebras provider config to opencode.json
When models from providers like Chutes or Cerebras were added via the admin panel,
they didn't work in the builder page because the opencode.json config file only
included the Ollama provider configuration.

This fix adds Chutes and Cerebras provider configurations to the opencode.json
file when their respective API keys are available in environment variables
(CHUTES_API_KEY and CEREBRAS_API_KEY).

Fixes the issue where chutes/deepseek-ai/DeepSeek-V3.2-TEE and similar models
would fail to load from the builder page.
2026-02-10 19:51:39 +00:00
southseact-3d
8b96273f47 builder: skip OpenCode verification when OPENCODE_REQUIRE_REPO=false 2026-02-10 19:09:22 +00:00
southseact-3d
bc45e3f964 builder: adapt OpenCode integration for Docker deployment; disable repo verification, remove JSON flag usage, parse text models, fix redo flow and session listing 2026-02-10 18:58:14 +00:00
southseact-3d
1af1f7b266 try again 2026-02-10 18:43:41 +00:00
southseact-3d
f1d3dce73c fix opencode error 2026-02-10 18:32:41 +00:00
southseact-3d
8e8129d71c Fix Editor.js plugin loading errors in blog admin
- Add multiple fallback global variable names for Editor.js plugins
- Add debug logging to track plugin availability
- Add error handling for editor initialization
- Ensure at least paragraph tool is available before initializing
- Fix ReferenceError: List is not defined when opening post modal
2026-02-10 18:13:13 +00:00
cto-new[bot]
efe3460447 Fix bun install in Docker build 2026-02-10 14:29:44 +00:00
southseact-3d
44d561df5d fix feat req 2026-02-10 13:58:34 +00:00
southseact-3d
25d23d8dd1 Add comprehensive feature request admin functionality
- Update data model to include status, adminReply, and updatedAt fields
- Hide user emails from public API responses for privacy
- Add admin-only endpoints: list, reply, update status, delete
- Create admin-feature-requests.html with full management UI
- Add status badges and admin replies to public feature requests page
- Add Feature Requests link to all admin page sidebars

Admin capabilities:
- View all feature requests with author emails (admin only)
- Reply to feature requests with admin responses visible to public
- Update status: pending, planned, in-progress, completed, declined
- Delete feature requests
- Filter and sort by status, votes, date
2026-02-10 13:27:36 +00:00
southseact-3d
0205820589 fix(settings): hide All Invoices modal by default using display: none
- Changed default display from flex to none to prevent modal from appearing at bottom of page
- Modal now properly hidden until View All button is clicked
2026-02-10 13:25:24 +00:00
southseact-3d
cfd8d9c706 feat: implement comprehensive blog system
Add dual-source blog system with Editor.js integration:
- Blog storage supporting repo-based (JSON) and database sources
- Admin panel with rich text editor using Editor.js
- Public news page with infinite scroll
- Individual blog post viewer page
- Categories management in admin
- Image upload functionality
- 4 SEO blog posts about WordPress with PluginCompass promotion
- 3 News blog posts about Plugin Compass
- API endpoints for CRUD operations
- Security and validation for admin operations

Closes blog feature request
2026-02-10 13:23:37 +00:00
southseact-3d
82ae9687b8 fix(settings): update All Invoices modal to show 5 items per page with pagination
- Changed INVOICES_PER_PAGE from 10 to 5
- Modal properly opens from Invoices section when clicking 'View All'
- Supports pagination with multiple pages in the popup
2026-02-10 13:22:07 +00:00
southseact-3d
8e9f2dec8e added support for todos 2026-02-10 11:53:31 +00:00
OpenCode Dev
cc40085441 feat: implement undo button to revert file changes and remove message from history
- Modified handleUndoMessage in server.js to remove the undone message from session history
- Added persistState() call to save the updated session state after undo
- Message is now removed from UI when undo is completed
- Works for opencode/build messages that are completed, errored, or cancelled
2026-02-10 10:59:36 +00:00
OpenCode Dev
ff9c30d136 Restore confirmation modal for proceed with build button 2026-02-10 10:40:35 +00:00
OpenCode Dev
89557cb4ed Fix plan message UI: always show model selector and make proceed with build send message directly 2026-02-10 10:39:40 +00:00
OpenCode Dev
7f8c54bac6 Revert "Merge pull request #17 from southseact-3d/cto-task-ok-so-for-the-plan-messages-when-the-proceed-with-build-butt"
This reverts commit 6908466cf3, reversing
changes made to 35b8084032.
2026-02-10 10:34:09 +00:00
cto-new[bot]
7221361ae1 Add model selector to plan messages proceed button 2026-02-10 10:17:27 +00:00
southseact-3d
35b8084032 Hide external WP tests UI elements from builder page 2026-02-10 10:04:59 +00:00