Skip to content

Commit 4088019

Browse files
akoclaude
andcommitted
feat: add Excluded column to catalog and [EXCLUDED] indicator to LIST
- Add Excluded BOOLEAN column to microflows and pages catalog tables - Populate Excluded from parsed BSON during catalog refresh - Show [EXCLUDED] suffix in LIST MICROFLOWS and LIST PAGES output Users can now query excluded documents: SELECT * FROM CATALOG.microflows WHERE Excluded = 1; SELECT * FROM CATALOG.pages WHERE Excluded = 1; Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2d41425 commit 4088019

5 files changed

Lines changed: 15 additions & 4 deletions

File tree

mdl/catalog/builder_microflows.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ func (b *Builder) buildMicroflows() error {
2323

2424
mfStmt, err := b.tx.Prepare(`
2525
INSERT INTO microflows (Id, Name, QualifiedName, ModuleName, Folder, MicroflowType,
26-
Description, ReturnType, ParameterCount, ActivityCount, Complexity,
26+
Description, ReturnType, ParameterCount, ActivityCount, Complexity, Excluded,
2727
ProjectId, ProjectName, SnapshotId, SnapshotDate, SnapshotSource,
2828
SourceId, SourceBranch, SourceRevision)
29-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
29+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
3030
`)
3131
if err != nil {
3232
return err
@@ -86,6 +86,7 @@ func (b *Builder) buildMicroflows() error {
8686
len(mf.Parameters),
8787
activityCount,
8888
complexity,
89+
mf.Excluded,
8990
projectID, projectName, snapshotID, snapshotDate, snapshotSource,
9091
sourceID, sourceBranch, sourceRevision,
9192
)
@@ -176,6 +177,7 @@ func (b *Builder) buildMicroflows() error {
176177
len(nf.Parameters),
177178
activityCount,
178179
complexity,
180+
nf.Excluded,
179181
projectID, projectName, snapshotID, snapshotDate, snapshotSource,
180182
sourceID, sourceBranch, sourceRevision,
181183
)

mdl/catalog/builder_pages.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ func (b *Builder) buildPages() error {
1919

2020
pageStmt, err := b.tx.Prepare(`
2121
INSERT INTO pages (Id, Name, QualifiedName, ModuleName, Folder, Title, URL, LayoutRef,
22-
Description, ParameterCount, WidgetCount,
22+
Description, ParameterCount, WidgetCount, Excluded,
2323
ProjectId, ProjectName, SnapshotId, SnapshotDate, SnapshotSource,
2424
SourceId, SourceBranch, SourceRevision)
25-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
25+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2626
`)
2727
if err != nil {
2828
return err
@@ -91,6 +91,7 @@ func (b *Builder) buildPages() error {
9191
pg.Documentation,
9292
len(pg.Parameters),
9393
widgetCnt,
94+
pg.Excluded,
9495
projectID, projectName, snapshotID, snapshotDate, snapshotSource,
9596
sourceID, sourceBranch, sourceRevision,
9697
)

mdl/catalog/tables.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ func (c *Catalog) createTables() error {
121121
ParameterCount INTEGER DEFAULT 0,
122122
ActivityCount INTEGER DEFAULT 0,
123123
Complexity INTEGER DEFAULT 1,
124+
Excluded BOOLEAN DEFAULT 0,
124125
ProjectId TEXT,
125126
ProjectName TEXT,
126127
SnapshotId TEXT,
@@ -148,6 +149,7 @@ func (c *Catalog) createTables() error {
148149
Description TEXT,
149150
ParameterCount INTEGER DEFAULT 0,
150151
WidgetCount INTEGER DEFAULT 0,
152+
Excluded BOOLEAN DEFAULT 0,
151153
ProjectId TEXT,
152154
ProjectName TEXT,
153155
SnapshotId TEXT,

mdl/executor/cmd_microflows_show.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ func (e *Executor) showMicroflows(moduleName string) error {
5353
modName := h.GetModuleName(modID)
5454
if moduleName == "" || modName == moduleName {
5555
qualifiedName := modName + "." + mf.Name
56+
if mf.Excluded {
57+
qualifiedName += " [EXCLUDED]"
58+
}
5659
folderPath := h.BuildFolderPath(mf.ContainerID)
5760
returnType := ""
5861
if mf.ReturnType != nil {

mdl/executor/cmd_pages_show.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ func (e *Executor) showPages(moduleName string) error {
4646
modName := h.GetModuleName(modID)
4747
if moduleName == "" || modName == moduleName {
4848
qualifiedName := modName + "." + p.Name
49+
if p.Excluded {
50+
qualifiedName += " [EXCLUDED]"
51+
}
4952
folderPath := h.BuildFolderPath(p.ContainerID)
5053
title := ""
5154
if p.Title != nil {

0 commit comments

Comments
 (0)