Skip to content
Back to skills

472 2026 02 02 Esc Handler Extraction Fe702a4e

ASecurity

Moved the app-level ESC cancellation cascade into a dedicated `ui/esc` module and delegated `action_cancel_request()` to an explicit handler. This isolates ESC logic from app internals and makes the dependency inputs explicit.

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 1, 2026
developmentshell

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned June 1, 2026

npx -y skills add tools-only/X-Skills --skill 472-2026-02-02-esc-handler-extraction_fe702a4e --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 472 2026 02 02 Esc Handler Extraction Fe702a4e?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 472 2026 02 02 Esc Handler Extraction Fe702a4e
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-472-2026-02-02-esc-handler-extraction-fe702a4e/badge)](https://www.skillsdirectory.com/skills/tools-only-472-2026-02-02-esc-handler-extraction-fe702a4e)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
title: Extract ESC Handling into ui/esc Module
link: esc-handler-extraction
type: delta
path: src/tunacode/ui/esc/handler.py
depth: 0
seams: [M, E]
ontological_relations:
  - relates_to: [[ui-esc-handling]]
  - affects: [[textual-app]]
tags:
  - refactor
  - ui
  - esc
  - modularity
created_at: 2026-02-02T19:34:51Z
updated_at: 2026-02-02T19:34:51Z
uuid: 63413ef6-ecbc-4f26-ba23-a9db43ce83b0
---

## Summary

Moved the app-level ESC cancellation cascade into a dedicated `ui/esc` module and delegated `action_cancel_request()` to an explicit handler. This isolates ESC logic from app internals and makes the dependency inputs explicit.

## Context

- New module: `src/tunacode/ui/esc/`
- Caller: `src/tunacode/ui/app.py` now delegates ESC handling

## Changes

- Added `EscHandler` with explicit dependency inputs for request task, shell runner, and editor state.
- Added dependency protocols in `ui/esc/types.py` to avoid coupling with concrete UI classes.
- Updated `TextualReplApp.action_cancel_request()` to delegate to the handler.

## Behavioral Impact

- No user-facing behavior changes.
- ESC handling order and early-return cascade remain identical.
- Modal ESC behavior unchanged (still handled in modal screens).

## Related Cards

- [[ui-esc-handling]]
- [[textual-app]]

Files in this skill

  • README.md1.1 KB
  • skill.md1.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.