@beastmode-develeap/beastmode 0.1.30 → 0.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/dist/web/board.html +81 -0
- package/package.json +1 -1
package/dist/web/board.html
CHANGED
|
@@ -2164,6 +2164,87 @@ window.addEventListener('unhandledrejection', function(e) {
|
|
|
2164
2164
|
});
|
|
2165
2165
|
</script>
|
|
2166
2166
|
|
|
2167
|
+
<script>
|
|
2168
|
+
// ================================================================
|
|
2169
|
+
// Pipeline configuration (Story 1 of the pipeline-board-view epic)
|
|
2170
|
+
// ================================================================
|
|
2171
|
+
//
|
|
2172
|
+
// PIPELINE_CONFIG maps each task type to its ordered pipeline stages,
|
|
2173
|
+
// and swimlanes group task types into visual columns. The authoritative
|
|
2174
|
+
// source is GET /api/pipeline-config on the board service (proxied via
|
|
2175
|
+
// the UI at the same path). We define hardcoded fallbacks here so:
|
|
2176
|
+
// 1. The page can render immediately without waiting for the fetch
|
|
2177
|
+
// 2. Existing code at lines ~2755 / ~2795 that uses
|
|
2178
|
+
// `typeof PIPELINE_CONFIG !== 'undefined'` gracefully gets real
|
|
2179
|
+
// data instead of falling back to its own inline defaults
|
|
2180
|
+
// 3. Scenarios that test `window.PIPELINE_CONFIG` find it on page load
|
|
2181
|
+
//
|
|
2182
|
+
// The fetch updates the globals asynchronously. If the fetch fails the
|
|
2183
|
+
// hardcoded defaults remain in place.
|
|
2184
|
+
window.PIPELINE_CONFIG = {
|
|
2185
|
+
type_stages: {
|
|
2186
|
+
'code': ['New', 'Ready', 'Working on it', 'Waiting for Spec & Scenarios Approval', 'Ready For Review', 'Approved & Merge to Main', 'Verifying Prod with Tests', 'Done'],
|
|
2187
|
+
'bug': ['New', 'Ready', 'Working on it', 'Waiting for Spec & Scenarios Approval', 'Ready For Review', 'Approved & Merge to Main', 'Verifying Prod with Tests', 'Done'],
|
|
2188
|
+
'bug-gc': ['New', 'Ready', 'Working on it', 'Waiting for Spec & Scenarios Approval', 'Ready For Review', 'Approved & Merge to Main', 'Verifying Prod with Tests', 'Done'],
|
|
2189
|
+
'epic': ['New', 'Ready', 'In Progress', 'Waiting for Epic Approval', 'Epic Breakdown Posted', 'Done'],
|
|
2190
|
+
'deep-planning': ['New', 'Ready', 'In Progress', 'Waiting for Epic Approval', 'Epic Breakdown Posted', 'Done'],
|
|
2191
|
+
'infra-plan': ['New', 'Ready', 'Working on it', 'Waiting for Infra Approval', 'Done'],
|
|
2192
|
+
'infrastructure': ['New', 'Ready', 'Working on it', 'Waiting for Infra Approval', 'Provisioning Infra', 'Infra Ready', 'Ready For Review', 'Approved & Merge to Main', 'Verifying Prod with Tests', 'Done'],
|
|
2193
|
+
'rollback': ['New', 'Ready', 'Working on it', 'Done'],
|
|
2194
|
+
},
|
|
2195
|
+
swimlanes: [
|
|
2196
|
+
{ key: 'code', label: 'Code & Bugs', taskTypes: ['code', 'bug', 'bug-gc'], color: 'var(--accent)' },
|
|
2197
|
+
{ key: 'epic', label: 'Epics & Planning', taskTypes: ['epic', 'deep-planning'], color: 'var(--purple)' },
|
|
2198
|
+
{ key: 'infra', label: 'Infrastructure', taskTypes: ['infra-plan', 'infrastructure'], color: 'var(--orange)' },
|
|
2199
|
+
{ key: 'other', label: 'Other', taskTypes: ['rollback'], color: 'var(--text-muted)' },
|
|
2200
|
+
],
|
|
2201
|
+
overlay_statuses: ['Stuck', 'Awaiting Input'],
|
|
2202
|
+
};
|
|
2203
|
+
window.SWIMLANE_CONFIG = window.PIPELINE_CONFIG.swimlanes;
|
|
2204
|
+
// Global aliases for the defensive code at lines ~2755 and ~2795
|
|
2205
|
+
var PIPELINE_CONFIG = window.PIPELINE_CONFIG;
|
|
2206
|
+
var SWIMLANE_CONFIG = window.SWIMLANE_CONFIG;
|
|
2207
|
+
|
|
2208
|
+
window.getStagesForType = function(taskType) {
|
|
2209
|
+
return window.PIPELINE_CONFIG.type_stages[taskType]
|
|
2210
|
+
|| window.PIPELINE_CONFIG.type_stages['code']
|
|
2211
|
+
|| [];
|
|
2212
|
+
};
|
|
2213
|
+
window.getSwimlaneForType = function(taskType) {
|
|
2214
|
+
return window.PIPELINE_CONFIG.swimlanes.find(function(s) {
|
|
2215
|
+
return (s.taskTypes || s.task_types || []).includes(taskType);
|
|
2216
|
+
}) || window.PIPELINE_CONFIG.swimlanes.find(function(s) { return s.key === 'other'; })
|
|
2217
|
+
|| window.PIPELINE_CONFIG.swimlanes[window.PIPELINE_CONFIG.swimlanes.length - 1];
|
|
2218
|
+
};
|
|
2219
|
+
// Functional aliases so the module script can call them unprefixed
|
|
2220
|
+
var getStagesForType = window.getStagesForType;
|
|
2221
|
+
var getSwimlaneForType = window.getSwimlaneForType;
|
|
2222
|
+
|
|
2223
|
+
// Fetch the authoritative config from the board service (via the UI
|
|
2224
|
+
// proxy at the same path). Non-blocking — the page keeps the fallback
|
|
2225
|
+
// if the fetch fails.
|
|
2226
|
+
fetch('/api/pipeline-config')
|
|
2227
|
+
.then(function(r) { return r.ok ? r.json() : Promise.reject(new Error('HTTP ' + r.status)); })
|
|
2228
|
+
.then(function(cfg) {
|
|
2229
|
+
// Normalise swimlane task type property: backend may return
|
|
2230
|
+
// task_types (snake_case); normalise to taskTypes (camelCase).
|
|
2231
|
+
if (cfg.swimlanes) {
|
|
2232
|
+
cfg.swimlanes.forEach(function(s) {
|
|
2233
|
+
if (s.task_types && !s.taskTypes) {
|
|
2234
|
+
s.taskTypes = s.task_types;
|
|
2235
|
+
}
|
|
2236
|
+
});
|
|
2237
|
+
}
|
|
2238
|
+
window.PIPELINE_CONFIG = cfg;
|
|
2239
|
+
window.SWIMLANE_CONFIG = cfg.swimlanes;
|
|
2240
|
+
PIPELINE_CONFIG = cfg;
|
|
2241
|
+
SWIMLANE_CONFIG = cfg.swimlanes;
|
|
2242
|
+
})
|
|
2243
|
+
.catch(function(err) {
|
|
2244
|
+
console.warn('Pipeline config fetch failed, using hardcoded defaults:', err && err.message);
|
|
2245
|
+
});
|
|
2246
|
+
</script>
|
|
2247
|
+
|
|
2167
2248
|
<script type="module">
|
|
2168
2249
|
// ================================================================
|
|
2169
2250
|
// CDN Imports
|