Skip to content

LIST FOLDERS, constant credentials for $metadata, and dark-mode filter popovers - #117

Merged
ako merged 4 commits into
mainfrom
claude/mxbuild-diagnostics-spike-emta6h
Aug 8, 2026
Merged

LIST FOLDERS, constant credentials for $metadata, and dark-mode filter popovers#117
ako merged 4 commits into
mainfrom
claude/mxbuild-diagnostics-spike-emta6h

Conversation

@ako

@ako ako commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Three fixes from the mxcli-formula1 findings, plus the symptom rows for them.

LIST FOLDERS — read a module's layout back (open issue #2)

MOVE could place a document in a folder, but nothing could read the placement back: SHOW STRUCTURE groups by document type at every depth and never names a folder, DESCRIBE answers for one document at a time. So a move could not be confirmed, and an intended layout could not be diffed against the real one, without opening the .mpr as SQLite.

Administration
  System Administration  [3]
    Page ActiveSessions
    ...
  User Management  [0]
  User Management/Admin  [9]
    Microflow ChangePassword
    ...
  _Docs/v4.3.2  [0]

(6 folder(s), 18 document(s))

Three properties are load-bearing for the diff use case, not cosmetic:

  • empty folders are listed ([0]) — a listing that hid them could not round-trip against an intended layout;
  • documents still at the module root appear under (module root) — what is not filed yet is the thing you most want to notice;
  • ordering is stable, so a diff between two runs shows only real movement.

Documents are indexed by ContainerID across every list call the backend offers, each best-effort: a backend that cannot answer one kind yields a listing missing that kind rather than no listing. --json gives one row per document (Module, Folder, Kind, Document).

Chosen as a new command over restructuring SHOW STRUCTURE, whose three depth levels are rendered by a dozen separate loops that agents already depend on. list is the verb per design-mdl-syntax.md; show folders is accepted as the legacy spelling.

OData: resolve constant credentials for the $metadata fetch

Follow-up to the earlier fix that made literal credentials work. HttpUsername: '@Module.ApiUser' still returned 401 and an empty client, because '@Module.ApiUser' is a STRING_LITERAL — the visitor's isLiteral flag said "literal" and the fifteen characters @Module.ApiUser went out as the username. The unresolved-credential note did not fire either, since as far as the code knew nothing was unresolved.

The fix resolves the constant's design-time default, which is exactly what Studio Pro sends on the same fetch. Three spellings now work ('v', @M.C, '@M.C'), and a dotted literal such as a password containing a dot is not mistaken for a reference.

Theme: dark-mode filter-operator popovers

An app themed dark still showed light-mode drop shadows under the datagrid's filter-operator popover and dropdown lists. The generated widget layer re-pointed .column-selectors but not the four rules in _datagrid-filters.scss that bake the same two-layer shadow — each already takes its background from --bg-color-secondary, which is why it read as a partial fix rather than an untouched widget. Verified in the compiled CSS by line number (30794 vs 27765), not in the source.

Verification

Tier Result
Unit tests pass; the LIST FOLDERS control run (stub out empty folders + the root bucket) confirms the assertions detect the defect
mxcli check on the doctype script clean, 21 statements
Full doctype integration gate (real mxbuild) ok … 609.122s, exit 0
18-folder-examples on modelsdk and legacy PASS
Live against a real project both verbs, with/without IN, --json
Theme applied to a real project, rebuilt, grepped theme.compiled.css

Docs: syntax topic folders (+ SeeAlso from move), quick-reference rows, a "Reading the Layout Back" section in organize-project.md, a doctype example, and three symptom rows in fix-issue.md.

Known inconsistency, not addressed here

show structure in Administration prints nothing for a system module without all, while list folders in Administration lists it. That divergence predates this change and is worth its own decision rather than a silent alignment.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4


Generated by Claude Code

claude added 4 commits August 8, 2026 12:35
Literal credentials started working when the fetch learned to authenticate, but
a constant reference still got a 401 and an empty client. That is the shape MDL
pushes users towards — mxcli requires a constant for ServiceUrl, so a client
written the documented way has constants for its credentials too. The tool
insisted on the shape whose credentials it would not read.

The quoted spelling was the sharp edge. `'@Module.ApiUser'` is a STRING_LITERAL,
so the isLiteral flag says "literal" and the previous code sent the fifteen
characters `@Module.ApiUser` as the username — worse than a 401, because it
looks like it tried, and no unresolved-credential note fired either.

All three spellings now resolve: a literal, `@Module.Name`, and the same
reference quoted. A constant's design-time default is exactly what Studio Pro
uses for its own fetch, so reading it is not a workaround — it is the value. An
unknown constant, or one with no default, still reports itself unresolved rather
than sending something that merely looks like a credential.

Verified against a basic-auth server that 401s without credentials and 403s
without a custom header: all three spellings cache the contract, where the
quoted form previously failed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
The widget layer covered .column-selectors and stopped there. Four more rules in
_datagrid-filters.scss bake the same two-layer light-mode shadow —

    box-shadow: 0 2px 20px 1px rgba(5, 15, 129, .05),
                0 2px 16px 0 rgba(33, 43, 54, .08);

— on the filter-operator popover, the dropdown filter's list in both its
standalone and contained forms, and the list inside a dropdown container. Each
already takes its background from --bg-color-secondary, so Atlas re-colours the
panel and leaves the shadow: elevation drawn for a light ground, floating over a
dark one.

Selectors read out of the shipped themesource, not the report — the fourth is
`.dropdown-container .dropdown-list`, which is nested and easy to miss.

Verified the way §33 insists on: applied the theme to a real project, ran
mxbuild, and read theme.compiled.css. The rule lands at line 30794, after the
widget module's own at 27765, so it wins the cascade.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
…pover fixes

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
MOVE could place a document in a folder, but nothing could read the
placement back. SHOW STRUCTURE groups by document type at every depth and
never names a folder; DESCRIBE answers for one document at a time. So a
move could not be confirmed, and an intended layout could not be diffed
against the real one, without opening the .mpr as SQLite.

LIST FOLDERS [IN Module] renders module -> folder path -> documents:

  Mv
    (module root)  [1]
      Microflow Read_Rows
    Api  [0]
    Api/Published  [1]
      ODataService Api
    Support  [1]
      JavaAction Helper

Three properties are load-bearing for the diff use case:

- Empty folders are listed ([0]). A listing that hid them could not
  round-trip against an intended layout.
- Documents still at the module root appear under "(module root)" rather
  than by subtraction -- what is not filed yet is what you most want to
  notice.
- Ordering is stable, so a diff shows only real movement.

Documents are indexed by ContainerID across every list call the backend
offers, each best-effort: a backend that cannot answer one kind yields a
listing missing that kind rather than no listing at all.

LIST is the verb per .claude/skills/design-mdl-syntax.md; SHOW is accepted
as the legacy spelling. FOLDERS is added to the keyword rule so it remains
usable as an identifier.

Wired end to end: MDLLexer.g4 (FOLDERS), MDLCatalog.g4 (showOrList FOLDERS
(IN ...)?), ast.ShowFolders, visitor, execShow. Syntax topic "folders",
quick-reference rows, organize-project skill section, doctype example,
symptom row.

Tests: cmd_list_folders_test.go. Verified live against a real project
(both verbs, with and without IN, --json).

mxcli-formula1 issue #2
@ako
ako merged commit 26dce46 into main Aug 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants