fix(site): update useAgentLogs to make it more testable and add more tests (#19126)

Take 2
Closes https://github.com/coder/internal/issues/644

## Changes made
- Updated how `useAgentLogs` was defined to make it easier to inject
specific data dependencies (basically making the hook more
unit-testable)
- Simplified the hook API to limit the amount of scope of data it needs
to work
- Added more test cases, and re-enabled the one test case we had
previously disabled
- Extracted our mock websocket code into a separate file, and added more
methods to it
- Updated all runtime code to accommodate new changes
This commit is contained in:
Michael Smith
2025-09-17 19:58:02 -04:00
committed by GitHub
parent d3bf5065a0
commit 759746cbf1
18 changed files with 479 additions and 284 deletions
+1
View File
@@ -54,6 +54,7 @@
}
},
"tailwindCSS.classFunctions": ["cva", "cn"],
"[css][html][markdown][yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},