Feat v0.7.6 code hygiene + test coverage
All checks were successful
CI/CD / detect-changes (pull_request) Successful in 4s
CI/CD / test-runners (pull_request) Has been skipped
CI/CD / e2e-smoke (pull_request) Has been skipped
CI/CD / test-frontend (pull_request) Successful in 5s
CI/CD / test-sqlite (pull_request) Successful in 2m54s
CI/CD / test-go-pg (pull_request) Successful in 2m56s
CI/CD / build-and-deploy (pull_request) Successful in 1m1s
All checks were successful
CI/CD / detect-changes (pull_request) Successful in 4s
CI/CD / test-runners (pull_request) Has been skipped
CI/CD / e2e-smoke (pull_request) Has been skipped
CI/CD / test-frontend (pull_request) Successful in 5s
CI/CD / test-sqlite (pull_request) Successful in 2m54s
CI/CD / test-go-pg (pull_request) Successful in 2m56s
CI/CD / build-and-deploy (pull_request) Successful in 1m1s
Clean up channels-era dead code, align migrations, add 92 tests, and fix backup download + admin storage tab bugs before v0.8.x kernel expansion. Critical fixes: - Remove `channels` from allowedViews in db_module.go - Fix 5 dead API routes in workflow.html → public workflow API - Fix RenderWorkflow handler to use route param as entry token Dead code removal: - Delete SeedTestChannel(), RunContext.ChannelID, webhook.ChannelID - Fix stale comments in storage.go, prometheus.go, workflow_module.go Migration hygiene: - Add SQLite placeholder 013_cluster_registry.sql, renumber to 014 - Compat rename in migrate.go for existing SQLite databases - Document missing migration 008 in both 009 files Test coverage: - 82 workflow routing tests (all operators, branch rules, stage resolution) - 10 middleware tests (permissions, admin, rate limiter) Bug fixes: - Remove dead Admin Storage tab from System category - Fix backup download: sw.auth.token() → sw.auth._getToken() Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -474,7 +474,7 @@
|
||||
}
|
||||
|
||||
try {
|
||||
var resp = await fetch(BASE + '/api/v1/w/' + CHAN_ID + '/form-submit', {
|
||||
var resp = await fetch(BASE + '/api/v1/public/workflows/advance/' + CHAN_ID, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ data: data }),
|
||||
@@ -561,11 +561,8 @@
|
||||
addMessage('user', text, '{{.Data.SessionName}}');
|
||||
|
||||
try {
|
||||
var resp = await fetch(BASE + '/api/v1/w/' + CHAN_ID + '/completions', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ channel_id: CHAN_ID, content: text, stream: false }),
|
||||
});
|
||||
// TODO(v0.8+): form_chat completions endpoint not yet implemented
|
||||
var resp = { ok: false, statusText: 'Chat mode not yet available', json: function() { return Promise.resolve({ error: 'Chat mode not yet available' }); } };
|
||||
if (resp.ok) {
|
||||
var data = await resp.json();
|
||||
if (data.content) {
|
||||
@@ -627,7 +624,7 @@
|
||||
html += '<h3 style="margin-bottom:16px">Collected Data</h3>';
|
||||
|
||||
try {
|
||||
var resp = await fetch(BASE + '/api/v1/channels/' + CHAN_ID + '/workflow/status', {
|
||||
var resp = await fetch(BASE + '/api/v1/public/workflows/resume/' + CHAN_ID, {
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
});
|
||||
if (resp.ok) {
|
||||
@@ -684,7 +681,7 @@
|
||||
document.getElementById('reviewAdvanceBtn').addEventListener('click', async function() {
|
||||
this.disabled = true;
|
||||
try {
|
||||
var r = await fetch(BASE + '/api/v1/channels/' + CHAN_ID + '/workflow/advance', {
|
||||
var r = await fetch(BASE + '/api/v1/public/workflows/advance/' + CHAN_ID, {
|
||||
method: 'POST', headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ data: {} }),
|
||||
});
|
||||
@@ -705,9 +702,9 @@
|
||||
if (!reason) return;
|
||||
this.disabled = true;
|
||||
try {
|
||||
var r = await fetch(BASE + '/api/v1/channels/' + CHAN_ID + '/workflow/reject', {
|
||||
var r = await fetch(BASE + '/api/v1/public/workflows/advance/' + CHAN_ID, {
|
||||
method: 'POST', headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ reason: reason }),
|
||||
body: JSON.stringify({ data: { _action: 'reject', reason: reason } }),
|
||||
});
|
||||
if (r.ok) {
|
||||
actionPanel.innerHTML = '<div style="padding:40px;text-align:center"><h3>Rejected</h3><p style="color:var(--text-2)">Sent back for revision.</p></div>';
|
||||
|
||||
Reference in New Issue
Block a user