Docker logs API returns multiplexed stream with 8-byte headers per frame,
not just newline-separated text. The old code split on \n which missed
frames that weren't newline-terminated.
Now properly parses the binary stream format:
- Reads 8-byte header (stream type + frame size)
- Extracts frame data based on size
- Splits frame content by newlines
- Correctly counts and displays requested number of lines
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Text-based batch commands (e.g., /start container1 container2) were
failing because Send Batch Start Message always used editMessageText,
but you can't edit the user's message.
Fixed by:
- Conditionally use sendMessage vs editMessageText based on fromKeyboard
- Capture new message_id from sendMessage response for progress updates
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The batch action (stop/start/restart) was being lost because:
1. Parse Callback Data extracted action: "stop"
2. Prepare Batch UI Input overwrote it with action: "exec" (the UI action type)
3. Handle Exec tried to parse callbackData which was empty
Fixed by:
- Adding batchAction field to Prepare Batch UI Input
- Adding batchAction to Batch UI trigger schema
- Updating Handle Exec to use triggerData.batchAction and selectedCsv
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The n8n Telegram node's inlineKeyboard parameter doesn't work reliably
with editMessageText operation. Switched to HTTP Request node calling
Telegram API directly, which properly passes reply_markup.
Changed nodes:
- Send Confirmation Dialog
- Send Stop Result
- Send Expired Message
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The n8n Telegram node's inlineKeyboard parameter expects the keyboard
rows array directly, not the full {inline_keyboard: [...]} object.
Fixed nodes:
- Send Confirmation Dialog
- Send Stop Result
- Send Expired Message
Changed from: JSON.stringify($json.reply_markup)
Changed to: JSON.stringify($json.reply_markup.inline_keyboard)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The batch rule was added at index 4 but connections weren't updated,
causing all subsequent rules to route to wrong handlers:
- select → Answer List Callback (wrong)
- list → Answer Action Callback (wrong)
- action → Answer Noop Callback (wrong)
- noop → nothing (missing)
Fixed by correcting outputs 5-8 to connect to proper handlers.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Switch node connections must use "main" array format with indices,
not named output keys. Changed from:
{ "list": [...], "status": [...] }
to:
{ "main": [ [...], [...], [...] ] }
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Execute Workflow nodes need mode: "once" to properly pass input
data to sub-workflows. Added to:
- Execute Container Status
- Execute Select Status
- Execute Paginate Status
- Execute Batch Cancel Status
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Route Status Result had no outgoing connections after status
sub-workflow extraction. Added connections:
- list output → Send Container List
- status_direct output → Edit Container List
- error output → Send Docker Error
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replaced TODO placeholders with actual n8n workflow IDs:
- Batch UI: ZJhnGzJT26UUmW45
- Container Status: lqpg2CqesnKE2RJQ
- Confirmation Dialogs: fZ1hu8eiovkCk08G
- Updated instructions.md with new workflow IDs and renamed files
- All workflows deployed and activated in n8n
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- New n8n-confirmation.json with 16 nodes
- Handle show_stop/show_update dialog generation
- Handle confirm_stop with expiry checking
- Handle confirm_update (returns action for main workflow)
- Handle cancel and expired actions
- Calls n8n-actions.json for confirmed stop execution
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Created n8n-workflow.json.backup-status for rollback
- Verified no orphan node references in main workflow
- Status sub-workflow has 11 nodes with Execute Workflow Trigger
- Created n8n-batch-ui.json with 16 nodes
- Handles batch selection UI: mode, toggle, nav, clear, cancel, exec actions
- Returns structured data for main workflow to send Telegram responses
- Entry point: Execute Workflow Trigger with input contract
- Uses existing Docker API pattern for container listing
Part of batch UI extraction (Task 1/3)
- Skip Delete Batch Select Message node for batch start
- Use editMessageText instead of sendMessage
- Batch start now smoothly transitions like batch stop
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed batch start to editMessageText so the confirmation message
gets updated with progress/results instead of leaving it hanging
and sending a separate progress message.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed from $('When executed by another workflow') to $('Route Action')
to avoid paired item reference errors when data flows through the
Resolve Container ID path.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Includes n8n API integration docs, workflow IDs, push commands,
and technical patterns learned during development.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When batch operations are triggered via keyboard callbacks, the main
workflow only passes container names (not IDs). The sub-workflows now:
- Check if containerId is empty
- If empty, query Docker API to resolve name → ID
- Then proceed with the action
This fixes batch start/stop/restart/update operations failing with
404 "page not found" errors.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Format Inline Logs Result now adds timestamp to message
- Shows 'Updated: HH:MM:SS' at bottom of logs display
- Ensures Telegram API always accepts refresh (content always different)
- Send Logs Response now uses Prepare Text Logs Input for chatId
- Container logs sub-workflow uses .includes() for fuzzy matching
- Multiple match handling added with helpful error message
- Remove parallel Send Text Update Started connection
- Text updates now only send result via sub-workflow
- Fixes duplicate message issue (Updating... + already up to date)
- Update Build Batch Keyboard to use bexec: format instead of legacy JSON
- Update Build Suggestion Keyboard to use action: format instead of legacy JSON
- Remove 7 nodes from old batch inline execution path:
- Build Batch Commands
- Prepare Batch Execution
- Execute Batch Action
- Parse Batch Result
- Format Batch Result
- Send Batch Result
- Answer Batch Query
Node count: 199 -> 192 (-7 nodes)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Deploy Container Logs sub-workflow to n8n (ID: oE7aO2GhbksXDEIw)
- Replace TODO_DEPLOY_LOGS_WORKFLOW with actual workflow ID
- Update n8n-container-logs.json with deployed ID
- Redeploy all workflows to n8n
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>