Commit Graph

64 Commits

Author SHA1 Message Date
southseact-3d
f5fee2ac4d Remove freePlanModel and opencodeBackupModel settings
Users now use OpenCode Models (Fallback Chain) for model selection.
- Removed Auto Model for Hobby/Free Plan section from admin panel
- Removed OpenCode Ultimate Backup Model section from admin panel
- Updated server to use opencodeModels for free plan users
- Removed backup model fallback logic (opencodeModels chain handles this)
2026-02-19 13:25:54 +00:00
Developer
a831f331cd Fix opencode models dropdown not loading on admin page
The populateOpencodeModelSelect() was called from loadConfigured() which
runs in parallel with loadAvailable() in init(). This caused a race condition
where the dropdown could be populated before state.available was set.

Fixed by moving the populateOpencodeModelSelect() call to after all loaders
complete in init(), ensuring state.available is populated first.
2026-02-18 20:25:39 +00:00
southseact-3d
d3205dafe5 Separate OpenCode and Public model management in admin panel
- Add OpenCode Models section with dropdown selection from available models
- Add Public Models section with manual model ID input
- Both sections have up/down ordering buttons for fallback chain priority
- OpenCode models used for execution fallback when rate limits/errors occur
- Public models displayed in builder dropdown for user selection
- Remove unified provider chain in favor of two separate lists
- Keep all existing functionality: Auto Model, Provider Limits, Icon Library, etc.
2026-02-18 19:49:46 +00:00
southseact-3d
3e81b6042c Remove icon from Buy Top-up button in token limit modal 2026-02-18 19:02:15 +00:00
southseact-3d
1b3b2cdf2a Restore complete admin functionality with new model structure
- Restored original admin.js with all functionality (2692 lines)
- Accounts, affiliates, withdrawals management restored
- All form handlers and API calls preserved
- Updated state to use opencodeModels instead of providerChain
- Updated element references for new OpenCode model structure
- Maintained all existing functionality while applying model changes
2026-02-18 17:01:29 +00:00
southseact-3d
b635c80d51 Add back sections 2, 3, 4: Auto Model, Provider Limits, and supporting functionality
- Section 2: Auto Model for Hobby/Free Plan form and handlers
- Section 3: Provider Limits & Usage with configurable rate limits
- Added state management for planSettings and providerLimits
- Added API integration for plan-settings and provider-limits endpoints
- Added populateAutoModelSelect and updateLimitModelOptions functions
- Added renderProviderUsage to display usage data
2026-02-18 16:39:08 +00:00
southseact-3d
828a9dad41 Remove separate chain concept - fallback is now determined by OpenCode models order
- Removed opencodeChain variable entirely
- Removed chain form/list from admin UI
- Fallback now uses the order of models in the OpenCode models list
- Updated buildOpencodeAttemptChain to iterate through opencodeModels
- Removed chain-related API endpoints
- Simplified to just two lists: opencodeModels and publicModels
2026-02-18 16:18:31 +00:00
southseact-3d
4bb54d38ad Consolidate OpenCode Chain into OpenCode Models section
- Removed separate OpenCode Chain card
- Integrated chain functionality as subsection within OpenCode Models
- Chain form and list now appear below the models list
- Added styling to distinguish the chain subsection
2026-02-18 15:28:04 +00:00
southseact-3d
3ba9fab6ab Clean up model structure: OpenCode Models, Chain, and Public Models
- Simplified to 3 clear sections:
  1. OpenCode Models: OpenCode dropdown + display name + order buttons
  2. OpenCode Chain: Fallback chain with add form + order buttons
  3. Public Models: Manual entry + order buttons (completely separate)
- New state variables: opencodeModels, opencodeChain, publicModels
- Clean API endpoints for chain operations
- Removed all confusing legacy code and naming
2026-02-18 15:11:12 +00:00
southseact-3d
cc17079988 Fix model sections: separate Provider Models and Public-Facing Models
- Provider Models section: restored OpenCode integration with dropdown
- Public-Facing Models section: completely separate manual entry
- Provider Chain section: fallback chain with up/down buttons (unchanged)
- Added separate arrays: providerModels and publicModels
- Added reorder support for both provider and public models
- Updated server to handle providerModel type and reorder by type
2026-02-18 14:38:19 +00:00
southseact-3d
7e5dc8b62d Add up/down reorder buttons and order numbers to public models
- Add order number badge (#1, #2, #3) to each public model
- Add up/down arrow buttons to reorder models in the list
- Add persistPublicModelsOrder function to save reordered list
- Add server-side /api/admin/models/reorder endpoint
- Remove automatic alphabetical sorting to preserve custom order
- First model (#1) gets green background highlighting
2026-02-18 14:08:21 +00:00
southseact-3d
44deabc2cf Add unified model chain system with public models and provider chain
- Add publicModels and providerChain data structures for unified fallback
- Add two separate model adding sections in admin panel (public-facing and provider models)
- Add up/down buttons to reorder provider chain order
- Update server to use unified chain for all model fallbacks
- Auto-migrate legacy data on first load
- Update admin.js to handle new model structure and forms
2026-02-18 10:37:01 +00:00
southseact-3d
ae7fdaac6f fix: use currently selected model when redoing messages
When redoing a 'proceed with build' message, the system now uses the
currently selected model from the dropdown instead of the original
message's model. This allows users to switch models before redoing.
2026-02-17 20:01:36 +00:00
southseact-3d
103951eb3c fix: skip undo in redo flow when no previous output exists
When clicking redo on a message, the system would fail with 'Command exited with code 1'
if there were previous opencode messages but none of them produced any output. Now we
check if previous messages actually had output (reply or partialOutput) before
attempting to undo, preventing the error when there's nothing to undo.

Fixes issue where redo button fails when previous messages had no output.
2026-02-17 10:13:12 +00:00
Developer
3f6e649965 fix: skip undo for first build message to avoid exit code 1 error
When clicking redo on the first build message, the system would fail with
'Command exited with code 1' because there was nothing to undo. Now we
detect if this is the first opencode message and skip the undo step,
proceeding directly to rebuilding.

Fixes issue where redo button fails on first message in builder.
2026-02-16 21:11:10 +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
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
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
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
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
Liam Hetherington
6cc4258d75 Show undo/redo controls even when builder output is empty 2026-02-11 09:46:54 +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
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
southseact-3d
a6ba703fd8 Fix three plan message issues:
1. Fix Ollama 504 Gateway Timeout - add 30s timeout to prevent long hangs
2. Add Ollama to provider error classification for proper fallback handling
3. Show model selector when proceed with build modal opens

These fixes ensure Ollama failures are handled gracefully with proper fallback
to Groq, and users can select their model before starting the build.
2026-02-10 10:00:38 +00:00
southseact-3d
b904e35528 Fix: Handle null el.limitBackup in admin.js to prevent TypeError when adding limits 2026-02-10 09:27:06 +00:00
OpenCode Dev
960ccb5742 Add hourly rate limits (tokens/hour, requests/hour) and missing providers (chutes, cerebras, ollama) 2026-02-10 09:04:44 +00:00
southseact-3d
a546eafc0b updt=ate ollama indocker and add plugins 2026-02-09 18:09:12 +00:00