[PR #3319] feat(websocket-history): add history support for websockets #4336

Open
opened 2026-03-17 01:53:01 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/3319
Author: @SamJakob
Created: 9/6/2023
Status: 🔄 Open

Base: mainHead: feat/websocket-history


📝 Commits (1)

  • 383a860 feat(websocket-history): add history support for websockets

📊 Changes

16 files changed (+661 additions, -188 deletions)

View changed files

.vscode/settings.json (+3 -0)
📝 packages/hoppscotch-common/src/components.d.ts (+4 -3)
📝 packages/hoppscotch-common/src/components/graphql/Sidebar.vue (+17 -1)
📝 packages/hoppscotch-common/src/components/history/graphql/Card.vue (+3 -18)
📝 packages/hoppscotch-common/src/components/history/index.vue (+95 -57)
packages/hoppscotch-common/src/components/history/realtime/websocket/Card.vue (+96 -0)
📝 packages/hoppscotch-common/src/components/http/Sidebar.vue (+9 -1)
📝 packages/hoppscotch-common/src/components/realtime/Communication.vue (+58 -20)
packages/hoppscotch-common/src/helpers/utils/list.ts (+16 -0)
📝 packages/hoppscotch-common/src/newstore/WebSocketSession.ts (+2 -4)
📝 packages/hoppscotch-common/src/newstore/history.ts (+166 -82)
📝 packages/hoppscotch-common/src/newstore/localpersistence.ts (+12 -0)
📝 packages/hoppscotch-common/src/pages/realtime/websocket.vue (+142 -2)
📝 packages/hoppscotch-data/src/index.ts (+1 -0)
packages/hoppscotch-data/src/websocket/content-types.ts (+7 -0)
packages/hoppscotch-data/src/websocket/index.ts (+30 -0)

📄 Description

Prerequisite for #3311 but also a useful feature in its own right.

Description

Adds a history pane to the WebSocket tab and support in hoppscotch-data for storing, retrieving and working with websocket command history.

Clicking on a history item connects you to the socket (if not already connected) or reconnects you if the command was for a different endpoint or set of parameters.

This PR also includes some refactoring of the history API and associated components/files.

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Additional Information

Please see #3311 for a justification of this feature as well.


🔄 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/hoppscotch/hoppscotch/pull/3319 **Author:** [@SamJakob](https://github.com/SamJakob) **Created:** 9/6/2023 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/websocket-history` --- ### 📝 Commits (1) - [`383a860`](https://github.com/hoppscotch/hoppscotch/commit/383a8609fcaaaa1b76e0610187f212d9711e512a) feat(websocket-history): add history support for websockets ### 📊 Changes **16 files changed** (+661 additions, -188 deletions) <details> <summary>View changed files</summary> ➕ `.vscode/settings.json` (+3 -0) 📝 `packages/hoppscotch-common/src/components.d.ts` (+4 -3) 📝 `packages/hoppscotch-common/src/components/graphql/Sidebar.vue` (+17 -1) 📝 `packages/hoppscotch-common/src/components/history/graphql/Card.vue` (+3 -18) 📝 `packages/hoppscotch-common/src/components/history/index.vue` (+95 -57) ➕ `packages/hoppscotch-common/src/components/history/realtime/websocket/Card.vue` (+96 -0) 📝 `packages/hoppscotch-common/src/components/http/Sidebar.vue` (+9 -1) 📝 `packages/hoppscotch-common/src/components/realtime/Communication.vue` (+58 -20) ➕ `packages/hoppscotch-common/src/helpers/utils/list.ts` (+16 -0) 📝 `packages/hoppscotch-common/src/newstore/WebSocketSession.ts` (+2 -4) 📝 `packages/hoppscotch-common/src/newstore/history.ts` (+166 -82) 📝 `packages/hoppscotch-common/src/newstore/localpersistence.ts` (+12 -0) 📝 `packages/hoppscotch-common/src/pages/realtime/websocket.vue` (+142 -2) 📝 `packages/hoppscotch-data/src/index.ts` (+1 -0) ➕ `packages/hoppscotch-data/src/websocket/content-types.ts` (+7 -0) ➕ `packages/hoppscotch-data/src/websocket/index.ts` (+30 -0) </details> ### 📄 Description Prerequisite for #3311 but also a useful feature in its own right. ### Description Adds a history pane to the WebSocket tab and support in `hoppscotch-data` for storing, retrieving and working with websocket command history. Clicking on a history item connects you to the socket (if not already connected) or reconnects you if the command was for a different endpoint or set of parameters. This PR also includes some refactoring of the history API and associated components/files. ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [x] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed ### Additional Information Please see #3311 for a justification of this feature as well. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4336
No description provided.