Skip to content

cmdio: split View into render - #7739

Draft
pietern wants to merge 1 commit into
pietern/charm-v2/02b-logstring-stripfrom
pietern/charm-v2/03a-render-split
Draft

pietern wants to merge 1 commit into
pietern/charm-v2/02b-logstring-stripfrom
pietern/charm-v2/03a-render-split

Conversation

@pietern

@pietern pietern commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Each TUI model's View() becomes a one-line wrapper around render():

  • libs/cmdio: prompt, select, spinner and pager.
  • libs/tableview: the table model.
  • cmd/air: the list TUI.

libs/apps/prompt gets a Theme alias for the huh theme and its builder is named appkitStyles; cmd/apps takes prompt.Theme instead of importing huh types.

Why

The next PRs route key handling through teainput and move rendering to v2 types. Separating render() from the bubbletea View() lets the key changes and the v2 View signature land without touching rendering code. It is a refactor: no behaviour change and no golden change.

select keeps tea.HideCursor in Init here. Removing it drops one ?25 reset from TestModesPin_Select, which is a golden change, so that removal goes into the v2 swap, where tea.HideCursor no longer exists.

Tests

  • go build ./..., golangci-lint (0 issues), gofmt clean.
  • go test for libs/cmdio/..., libs/tableview/..., libs/apps/..., cmd/air/..., cmd/apps/..., cmd/aitools/.... Passes.
  • The pins pass without -update. No golden changes.
  • Full acceptance was not run on this intermediate branch; the final branch of the stack ran it.

Stack: based on pietern/charm-v2/02b-logstring-strip.

Manual checks for real terminals: none for this PR (refactor).

This pull request and its description were written by Isaac.

@pietern
pietern force-pushed the pietern/charm-v2/03a-render-split branch from 6ba40d3 to 96d0f82 Compare November 17, 2026 22:29
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: e634ad9

Run: 44310892621

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 272 19 17:40
💚​ aws-windows-latest-4core-16gb 1 274 17 11:46
💚​ azure linux-2core-8gb 1 271 19 12:53
💚​ azure-windows-latest-4core-16gb 1 273 17 10:36
💚​ gcp linux-2core-8gb 1 272 19 14:04
💚​ gcp-windows-latest-4core-16gb 1 274 17 10:38
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 38 slowest tests (at least 2 minutes):
duration env testname
5:57 aws linux-2core-8gb TestFilerWorkspaceFilesExtensionsDelete
5:52 aws-windows-latest-4core-16gb TestImportDirDoesNotOverwrite
4:54 aws linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
4:28 aws linux-2core-8gb TestImportDirDoesNotOverwrite
4:02 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsRead
3:52 aws linux-2core-8gb TestFilerRecursiveDelete/workspace_files
3:46 aws-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsDelete
3:45 azure-windows-latest-4core-16gb TestSyncFullFileSync
3:43 azure-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files
3:37 gcp-windows-latest-4core-16gb TestFilerReadWrite/workspace_files
3:34 gcp-windows-latest-4core-16gb TestAccept
3:33 azure-windows-latest-4core-16gb TestAccept
3:29 aws linux-2core-8gb TestFilerWorkspaceFilesExtensionsRead
3:13 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsStat
3:13 azure-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files_extensions
3:06 gcp-windows-latest-4core-16gb TestSyncIncrementalFileSync
3:02 gcp-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files_extensions
3:01 aws-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsRead
2:59 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
2:56 aws-windows-latest-4core-16gb TestLockUnlockWithoutAllowsLockFileNotExist
2:54 aws-windows-latest-4core-16gb TestAccept
2:51 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
2:49 aws linux-2core-8gb TestImportDirWithOverwriteFlag
2:45 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsDelete
2:39 gcp-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsRead
2:33 gcp linux-2core-8gb TestSyncFullFileSync
2:31 aws-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsReadDir
2:30 azure-windows-latest-4core-16gb TestImportDirWithOverwriteFlag
2:30 gcp-windows-latest-4core-16gb TestFilerReadWrite/workspace_files_extensions
2:29 azure-windows-latest-4core-16gb TestSyncIncrementalFileSync
2:25 gcp-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files
2:24 azure linux-2core-8gb TestSyncIncrementalFileSync
2:21 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsRead
2:16 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsRead
2:16 aws-windows-latest-4core-16gb TestSyncFullFileSync
2:14 aws-windows-latest-4core-16gb TestFilerWorkspaceNotebook/sqlJupyterNotebook.ipynb
2:11 aws-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files
2:03 gcp linux-2core-8gb TestSyncIncrementalFileSync

@pietern
pietern added this pull request to stack #7754 November 18, 2026 08:35
@pietern

pietern commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

/review

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me — no issues found.

@pietern
pietern force-pushed the pietern/charm-v2/03a-render-split branch from 96d0f82 to e634ad9 Compare November 18, 2026 13:07
@github-actions github-actions Bot added the AIR Databricks AI Runtime CLI label Nov 18, 2026
@pietern
pietern force-pushed the pietern/charm-v2/03a-render-split branch from e634ad9 to 9e423b9 Compare November 18, 2026 15:55
Every TUI model's View becomes a one-line wrapper around render(), so the
next change can route key handling through the teainput decoder without
touching the rendering. libs/apps/prompt gets a Theme alias for the huh
theme and its builder is named appkitStyles, which cmd/apps uses through
prompt.Theme instead of importing huh types directly.

Behaviour is unchanged and no pin golden moves. select keeps its
tea.HideCursor in Init: removing it drops one "?25 reset" from
TestModesPin_Select, which is a golden change, so that removal waits
for the v2 swap that drops tea.HideCursor.

Co-authored-by: Isaac <no-reply@databricks.com>
@pietern
pietern force-pushed the pietern/charm-v2/03a-render-split branch from 9e423b9 to 3051f0a Compare November 18, 2026 16:07

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIR Databricks AI Runtime CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants