[PR #19673] [CLOSED] feat: add keyboard shortcuts to Playground #64161

Closed
opened 2026-05-06 09:31:15 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/19673
Author: @pxkundu
Created: 12/2/2025
Status: Closed

Base: devHead: fix/issue-1008-playground-shortcuts


📝 Commits (2)

  • 13c234c feat: add keyboard shortcuts to Playground
  • 0f2b03c chore: update .gitignore to exclude testing docs

📊 Changes

5 files changed (+370 additions, -3 deletions)

View changed files

📝 .gitignore (+2 -0)
cypress/e2e/playground.cy.ts (+172 -0)
📝 src/lib/components/playground/Chat.svelte (+88 -1)
📝 src/lib/components/playground/Completions.svelte (+64 -1)
📝 src/lib/shortcuts.ts (+44 -1)

📄 Description

Pull Request Checklist

  • Target branch: dev branch
  • Description: Added keyboard shortcuts to Playground
  • Changelog: Included below
  • Testing: E2E tests written

Description

This PR adds keyboard shortcuts to the Playground feature, addressing issue #1008. The Playground previously had no keyboard shortcuts, making it inefficient for keyboard-focused users.

Changes

  • Added 6 new shortcut definitions to src/lib/shortcuts.ts:

    • Focus Input (Ctrl/Cmd + L)
    • Run (Ctrl/Cmd + Enter)
    • Cancel (Escape)
    • Add Message (Ctrl/Cmd + Shift + Enter)
    • Toggle System Instructions (Ctrl/Cmd + S)
    • Toggle Role (Ctrl/Cmd + R)
  • Implemented shortcut handlers in:

    • src/lib/components/playground/Chat.svelte
    • src/lib/components/playground/Completions.svelte
  • Added Cypress E2E tests in cypress/e2e/playground.cy.ts (11 test cases)

Changelog Entry

Added

  • Keyboard shortcuts for Playground Chat and Completions
  • Cypress E2E tests for all playground shortcuts (11 test cases)
  • Route-aware shortcut handling to prevent conflicts with main chat shortcuts

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.

Closes #1008


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/19673 **Author:** [@pxkundu](https://github.com/pxkundu) **Created:** 12/2/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix/issue-1008-playground-shortcuts` --- ### 📝 Commits (2) - [`13c234c`](https://github.com/open-webui/open-webui/commit/13c234c4513d3f50ac63a255d7ccd8a1b527385f) feat: add keyboard shortcuts to Playground - [`0f2b03c`](https://github.com/open-webui/open-webui/commit/0f2b03c568002f87e106e0e1781adb6bc6e17c4b) chore: update .gitignore to exclude testing docs ### 📊 Changes **5 files changed** (+370 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+2 -0) ➕ `cypress/e2e/playground.cy.ts` (+172 -0) 📝 `src/lib/components/playground/Chat.svelte` (+88 -1) 📝 `src/lib/components/playground/Completions.svelte` (+64 -1) 📝 `src/lib/shortcuts.ts` (+44 -1) </details> ### 📄 Description # Pull Request Checklist - [x] **Target branch:** dev branch - [x] **Description:** Added keyboard shortcuts to Playground - [x] **Changelog:** Included below - [x] **Testing:** E2E tests written ## Description This PR adds keyboard shortcuts to the Playground feature, addressing issue #1008. The Playground previously had no keyboard shortcuts, making it inefficient for keyboard-focused users. ## Changes - Added 6 new shortcut definitions to `src/lib/shortcuts.ts`: - Focus Input (Ctrl/Cmd + L) - Run (Ctrl/Cmd + Enter) - Cancel (Escape) - Add Message (Ctrl/Cmd + Shift + Enter) - Toggle System Instructions (Ctrl/Cmd + S) - Toggle Role (Ctrl/Cmd + R) - Implemented shortcut handlers in: - `src/lib/components/playground/Chat.svelte` - `src/lib/components/playground/Completions.svelte` - Added Cypress E2E tests in `cypress/e2e/playground.cy.ts` (11 test cases) # Changelog Entry ### Added - Keyboard shortcuts for Playground Chat and Completions - Cypress E2E tests for all playground shortcuts (11 test cases) - Route-aware shortcut handling to prevent conflicts with main chat shortcuts ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. Closes #1008 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-06 09:31:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#64161