Skip to content

feat: integrated editor, project templates, visual env vars, log search/download, multi-session terminal - #13

Merged
djpfs merged 3 commits into
mainfrom
copilot/aprimorar-experiencia-desenvolvimento
Aug 14, 2026
Merged

feat: integrated editor, project templates, visual env vars, log search/download, multi-session terminal#13
djpfs merged 3 commits into
mainfrom
copilot/aprimorar-experiencia-desenvolvimento

Conversation

Copilot AI commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Adds five developer-experience improvements: an integrated file editor with project scaffolding templates, a visual env-var editor, searchable/filterable/downloadable logs, and a multi-session terminal per container.

Integrated Compose/Dockerfile Editor (ComposeEditorView)

  • New Editor sidebar item hosts a monospaced TextEditor switchable between docker-compose.yml and Dockerfile
  • Open/Save via NSOpenPanel/NSSavePanel; file kind auto-detected on open

Project Templates

  • Five built-in starters (Node.js+Postgres, Flask+Redis, Go multi-stage, PostgreSQL, Nginx static) available from a "Templates" sheet
  • Each template pre-fills both the compose file and Dockerfile editors

Visual Environment Variable Management (ContainerSettingsView)

  • Replaced raw KEY=VALUE text fields with separate Key / Value columns
  • New SettingsModel.EnvEntry splits on the first = only — preserves values that contain =

Log Search, Filter & Download

  • Container logs tab: live search bar with AttributedString match highlighting, "Errors only" toggle, line counter, and Download → NSSavePanel
  • Compose log panel: inline filter bar + Download button added alongside existing Copy/Clear

Multi-Session Terminal

  • Each container now holds [ContainerTerminalSession] in AppState instead of a single session
  • Tab bar shows sessions with a connected indicator; + adds, × closes (last tab is protected)
  • Sessions identified by a stable UUID objectID — avoids ForEach mis-renders when middle sessions are removed
// AppState now manages session lists per container
func terminalSessions(for containerID: String) -> [ContainerTerminalSession]
func addTerminalSession(for containerID: String) -> ContainerTerminalSession
func removeTerminalSession(_ session: ContainerTerminalSession)

Copilot AI linked an issue Aug 14, 2026 that may be closed by this pull request
…oad, multi-session terminal

Co-authored-by: djpfs <43576725+djpfs@users.noreply.github.com>
Copilot AI changed the title [WIP] Add integrated editor for Compose and Dockerfile feat: integrated editor, project templates, visual env vars, log search/download, multi-session terminal Aug 14, 2026
Copilot AI requested a review from djpfs August 14, 2026 03:15
@djpfs
djpfs marked this pull request as ready for review August 14, 2026 03:42
@djpfs
djpfs requested a lite review from Copilot August 14, 2026 03:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR delivers multiple developer-experience enhancements to the AppleDockerApp UI: a new integrated Compose/Dockerfile editor with project templates, improved environment-variable editing, searchable/downloadable logs, and multi-session container terminals backed by persistent AppState storage.

Changes:

  • Added ComposeEditorView with built-in project templates plus Open/Save support, and exposed it in the sidebar.
  • Reworked container environment variable editing into structured key/value rows with correct parsing of values containing =.
  • Enhanced logs (container + compose) with search/filter UI and added “Download” actions; updated terminal to support multiple sessions per container.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Sources/AppleDockerApp/Views/ContainerTerminalView.swift Implements multi-session terminal UI with tab bar and per-session panel.
Sources/AppleDockerApp/Views/ContainerTerminalSession.swift Adds stable identity (objectID) and labeling for terminal sessions.
Sources/AppleDockerApp/Views/ContainerSettingsView.swift Switches env vars to key/value entries and updates config serialization.
Sources/AppleDockerApp/Views/ContainerDetailView.swift Adds log search/filter UI, highlighting, and download support for container logs.
Sources/AppleDockerApp/Views/ComposeView.swift Adds compose log filtering UI and download support.
Sources/AppleDockerApp/Views/ComposeEditorView.swift Introduces new integrated editor view + project templates sheet.
Sources/AppleDockerApp/AppState.swift Updates terminal session storage to support multiple sessions per container.
Sources/AppleDockerApp/App.swift Adds “Editor” sidebar item routing to ComposeEditorView.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 273 to 275
Button {
model.envVars.remove(at: index)
model.envVars.removeAll { $0.id == entry.id }
} label: {
Comment thread Sources/AppleDockerApp/Views/ComposeEditorView.swift Outdated
Comment on lines +355 to +356
let content = lines.joined(separator: "\n")
try? content.write(to: url, atomically: true, encoding: .utf8)
Comment on lines +482 to +483
let content = state.composeLogLines.joined(separator: "\n")
try? content.write(to: url, atomically: true, encoding: .utf8)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@copilot Fix the code for all comments in this review comment.

When a review comment includes a suggested change, apply the suggestion exactly.

Do not make changes beyond what is described in the linked review comment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 946db53.

Co-authored-by: djpfs <43576725+djpfs@users.noreply.github.com>
Copilot AI requested a review from djpfs August 14, 2026 06:06
@djpfs
djpfs merged commit 788c453 into main Aug 14, 2026
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.

Aprimorar experiência de desenvolvimento

3 participants