Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
863e1d3
Update pnpm-lock.yaml and enhance dashboard dev tools
mantrakp04 Mar 20, 2026
d4a17f4
Update pnpm-lock.yaml and enhance dev tool components
mantrakp04 Mar 27, 2026
01cbe39
Merge branch 'dev' into feat/dev-tool
mantrakp04 Mar 27, 2026
7bfde19
Refactor dashboard configuration and clean up template dependencies
mantrakp04 Mar 27, 2026
ce13ce2
Refactor dev tool components and enhance URL handling
mantrakp04 Mar 30, 2026
40c7d79
Merge branch 'dev' into feat/dev-tool
mantrakp04 Mar 30, 2026
e3feccc
Enhance feedback handling and introduce new internal API routes
mantrakp04 Mar 31, 2026
754f296
Refactor component version handling and improve feedback tests
mantrakp04 Mar 31, 2026
3c5b938
Merge branch 'dev' into feat/dev-tool
mantrakp04 Mar 31, 2026
fd4ade1
Refactor dev tool components and enhance functionality
mantrakp04 Mar 31, 2026
86f480c
Refactor feedback tests for improved clarity and consistency
mantrakp04 Apr 1, 2026
4a9272c
Remove deprecated dev tool components and consolidate functionality
mantrakp04 Apr 1, 2026
b2a73d2
Add request logging functionality to StackClientInterface
mantrakp04 Apr 1, 2026
38f6ddf
Merge branch 'dev' into feat/dev-tool
mantrakp04 Apr 4, 2026
aea74a3
Merge branch 'dev' into feat/dev-tool
mantrakp04 Apr 6, 2026
0c178c5
Refactor component version handling and add tests for API endpoint
mantrakp04 Apr 6, 2026
9f9000e
Updated component prompts
N2D4 Apr 9, 2026
4180be2
Merge branch 'dev' into feat/dev-tool
mantrakp04 Apr 9, 2026
5f8debe
Add "restricted users redirected to onboarding" logic to sign in and …
N2D4 Apr 9, 2026
37a37a6
Refactor dev environment scripts and add new demo pages for dev tools
mantrakp04 Apr 9, 2026
2607576
Merge branch 'dev' into feat/dev-tool
mantrakp04 Apr 9, 2026
633acc6
Implement trigger position snapping and management in dev tools
mantrakp04 Apr 11, 2026
a365ac4
Merge branch 'dev' into feat/dev-tool
N2D4 Apr 12, 2026
b1780b4
Update prompt
N2D4 Apr 12, 2026
8be613c
Merge branch 'dev' into feat/dev-tool
mantrakp04 Apr 13, 2026
3bbdfc9
Enhance AI Proxy Integration and Dev Tool UI
mantrakp04 Apr 13, 2026
e51d459
Refactor Dev Tool Core Functions and Enhance URL Target Tests
mantrakp04 Apr 13, 2026
01982ff
Refactor Dev Tool Tab Functions to Return Structured Results
mantrakp04 Apr 13, 2026
359e6d1
Refactor Panel Closing Logic in Dev Tool Core
mantrakp04 Apr 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactor feedback tests for improved clarity and consistency
- Updated feedback test cases to ensure consistent email and message length checks.
- Removed optional chaining in assertions for better readability and reliability.
- Enhanced test coverage for feedback submissions, ensuring accurate validation of email and message content.
  • Loading branch information
mantrakp04 committed Apr 1, 2026
commit 86f480c86fe27c8a074fd7d86201edd626bbc5ed
27 changes: 15 additions & 12 deletions apps/e2e/tests/backend/endpoints/api/v1/internal/feedback.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,19 @@ describe("POST /api/v1/internal/feedback", () => {
`);

const emails = await waitForOutboxEmailWithStatus(subject, "sent");
expect(emails[0]?.to).toMatchObject({
expect(emails).toHaveLength(1);
expect(emails[0].to).toMatchObject({
type: "custom-emails",
emails: ["team@stack-auth.com"],
});

const messages = await recipientMailbox.waitForMessagesWithSubject(subject);
expect(messages).toHaveLength(1);
expect(messages[0]?.subject).toBe(subject);
expect(messages[0]?.body?.text).toContain("Support Tester");
expect(messages[0]?.body?.text).toContain(senderEmail);
expect(messages[0]?.body?.text).toContain(signInResult.userId);
expect(messages[0]?.body?.text).toContain("Authenticated feedback from the dashboard.");
expect(messages[0].subject).toBe(subject);
expect(messages[0].body?.text).toContain("Support Tester");
expect(messages[0].body?.text).toContain(senderEmail);
expect(messages[0].body?.text).toContain(signInResult.userId);
expect(messages[0].body?.text).toContain("Authenticated feedback from the dashboard.");
});

it("should send feedback without authentication (dev tool)", async ({ expect }) => {
Expand Down Expand Up @@ -92,16 +93,17 @@ describe("POST /api/v1/internal/feedback", () => {
`);

const emails = await waitForOutboxEmailWithStatus(subject, "sent");
expect(emails[0]?.to).toMatchObject({
expect(emails).toHaveLength(1);
expect(emails[0].to).toMatchObject({
type: "custom-emails",
emails: ["team@stack-auth.com"],
});

const messages = await recipientMailbox.waitForMessagesWithSubject(subject);
expect(messages).toHaveLength(1);
expect(messages[0]?.body?.text).toContain("Dev Tool User");
expect(messages[0]?.body?.text).toContain("devtool-user@example.com");
expect(messages[0]?.body?.text).toContain("Unauthenticated feedback from the dev tool.");
expect(messages[0].body?.text).toContain("Dev Tool User");
expect(messages[0].body?.text).toContain("devtool-user@example.com");
expect(messages[0].body?.text).toContain("Unauthenticated feedback from the dev tool.");
});

it("should send bug reports with correct label", async ({ expect }) => {
Expand Down Expand Up @@ -130,14 +132,15 @@ describe("POST /api/v1/internal/feedback", () => {
`);

const emails = await waitForOutboxEmailWithStatus(subject, "sent");
expect(emails[0]?.to).toMatchObject({
expect(emails).toHaveLength(1);
expect(emails[0].to).toMatchObject({
type: "custom-emails",
emails: ["team@stack-auth.com"],
});

const messages = await recipientMailbox.waitForMessagesWithSubject(subject);
expect(messages).toHaveLength(1);
expect(messages[0]?.subject).toBe("[Bug Report] bug@example.com");
expect(messages[0].subject).toBe("[Bug Report] bug@example.com");
});

it("should reject invalid payloads", async ({ expect }) => {
Expand Down
1 change: 1 addition & 0 deletions packages/template/src/dev-tool/dev-tool-indicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ function useFetchInterceptor(addApiLog: (entry: ApiLogEntry) => void, addEventLo
useEffect(() => {
if (typeof window === 'undefined') return;
// Avoid double-patching (e.g. during HMR remounts)
// Cast to any: adding a runtime-only property (__stackDevToolPatched) to window.fetch which isn't in DOM types
if ((window.fetch as any).__stackDevToolPatched) return;
Comment thread
mantrakp04 marked this conversation as resolved.
Outdated

const originalFetch = window.fetch;
Expand Down