Skip to content

Improve collapsible sections: System-Prompts and Bot-Edit Preview#174

Merged
tmseidel merged 1 commit into
developfrom
feature/improve-edit-pages-system-prompts
May 24, 2026
Merged

Improve collapsible sections: System-Prompts and Bot-Edit Preview#174
tmseidel merged 1 commit into
developfrom
feature/improve-edit-pages-system-prompts

Conversation

@tmseidel
Copy link
Copy Markdown
Owner

Features:

  • Convert System-Prompts edit page to collapsible accordion layout for better UX with many prompts
  • Add System-Prompt preview accordion to Bot-Edit modal with E2E workflow prompts (Planner, Author, Runner)
  • Implement localStorage persistence of expanded/collapsed states across all collapsible sections
  • Add "Expand all" / "Collapse all" buttons for quick navigation

Features:
- Convert System-Prompts edit page to collapsible accordion layout for better UX with many prompts
- Add System-Prompt preview accordion to Bot-Edit modal with E2E workflow prompts (Planner, Author, Runner)
- Implement localStorage persistence of expanded/collapsed states across all collapsible sections
- Add "Expand all" / "Collapse all" buttons for quick navigation
@tmseidel tmseidel linked an issue May 24, 2026 that may be closed by this pull request
@clicki-mc-testface
Copy link
Copy Markdown
Collaborator

E2E Test Run for PR #174

🤖 Starting end-to-end test run — this typically takes several minutes.

  • Framework: playwright
  • Suite lifecycle: offer-as-pr

I'll deploy a preview environment, generate the test suite and post the results here when the run finishes. Use @bot rerun-tests to re-execute or @bot regenerate-tests <feedback> to re-plan the suite.

@clicki-mc-testface
Copy link
Copy Markdown
Collaborator

E2E Test Run for PR #174

Framework: playwright
Preview environment: http://46.225.226.81:20027
Source SHA: 489eea10
Outcome: ✅ PASSED (1/1 passed)

Test Status Duration
tests/collapsible-sections-script-loaded.spec.ts
Collapsible sections helper script is served
✅ PASSED 1.01s

1/1 passed

@clicki-mc-testface
Copy link
Copy Markdown
Collaborator

Suite promotion (offer-as-pr)

✅ Opened follow-up PR #175 on branch ai-tests/pr-174 with 1 generated test file(s).

@tmseidel
Copy link
Copy Markdown
Owner Author

@clicki-mc-testface regenerate-tests Add more tests, check if the sections in system-settings/system-prompts/1/edit are working correctly

@clicki-mc-testface
Copy link
Copy Markdown
Collaborator

E2E Test Run for PR #174

🤖 Starting end-to-end test run — this typically takes several minutes.

  • Framework: playwright
  • Suite lifecycle: offer-as-pr

I'll deploy a preview environment, generate the test suite and post the results here when the run finishes. Use @bot rerun-tests to re-execute or @bot regenerate-tests <feedback> to re-plan the suite.

@clicki-mc-testface
Copy link
Copy Markdown
Collaborator

bot-edit-preview-accordion-sections — error context (4.4 KiB)

# Instructions

- Following Playwright test failed.
- Explain why, be concise, respect Playwright best practices.
- Provide a snippet of code with the fix, if possible.

# Test info

- Name: bot-edit-preview-accordion-sections.spec.ts >> Bot-Edit System-Prompt preview modal shows all 6 accordion sections
- Location: tests/bot-edit-preview-accordion-sections.spec.ts:3:1

# Error details

Test timeout of 30000ms exceeded.


Error: locator.click: Test timeout of 30000ms exceeded.
Call log:

  • waiting for locator('[data-bs-toggle="modal"], a, button').filter({ hasText: /Edit/i }).first()

# Page snapshot

```yaml
- generic [ref=e2]:
  - navigation [ref=e3]:
    - generic [ref=e4]:
      - link "AI Git Bot logo AI Git Bot" [ref=e5] [cursor=pointer]:
        - /url: /dashboard
        - img "AI Git Bot logo" [ref=e6]
        - text: AI Git Bot
      - generic [ref=e7]:
        - list [ref=e8]:
          - listitem [ref=e9]:
            - link " Dashboard" [ref=e10] [cursor=pointer]:
              - /url: /dashboard
              - generic [ref=e11]: 
              - text: Dashboard
          - listitem [ref=e12]:
            - link " Bots" [ref=e13] [cursor=pointer]:
              - /url: /bots
              - generic [ref=e14]: 
              - text: Bots
          - listitem [ref=e15]:
            - link " AI Integrations" [ref=e16] [cursor=pointer]:
              - /url: /ai-integrations
              - generic [ref=e17]: 
              - text: AI Integrations
          - listitem [ref=e18]:
            - link " Git Integrations" [ref=e19] [cursor=pointer]:
              - /url: /git-integrations
              - generic [ref=e20]: 
              - text: Git Integrations
          - listitem [ref=e21]:
            - link " System settings" [ref=e22] [cursor=pointer]:
              - /url: /system-settings
              - generic [ref=e23]: 
              - text: System settings
        - list [ref=e24]:
          - listitem [ref=e25]:
            - button "Toggle color theme" [ref=e26] [cursor=pointer]:
              - generic [ref=e27]: 
          - listitem [ref=e28]:
            - button " Logout" [ref=e30] [cursor=pointer]:
              - generic [ref=e31]: 
              - text: Logout
  - main [ref=e32]:
    - generic [ref=e33]:
      - generic [ref=e34]:
        - heading " Bots" [level=2] [ref=e35]:
          - generic [ref=e36]: 
          - text: Bots
        - link " New Bot" [ref=e37] [cursor=pointer]:
          - /url: /bots/new
          - generic [ref=e38]: 
          - text: New Bot
      - generic [ref=e41]:
        - generic [ref=e42]: 
        - paragraph [ref=e43]: No bots configured yet.
        - link " Create your first bot" [ref=e44] [cursor=pointer]:
          - /url: /bots/new
          - generic [ref=e45]: 
          - text: Create your first bot

Test source

  1  | import { test, expect } from '@playwright/test';
  2  | 
  3  | test('Bot-Edit System-Prompt preview modal shows all 6 accordion sections', async ({ page }) => {
  4  |   await page.goto('/bots');
  5  | 
  6  |   // Open the edit modal for the first bot listed
  7  |   const editTrigger = page
  8  |     .locator('[data-bs-toggle="modal"], a, button')
  9  |     .filter({ hasText: /Edit/i })
  10 |     .first();
> 11 |   await editTrigger.click();
     |                     ^ Error: locator.click: Test timeout of 30000ms exceeded.
  12 | 
  13 |   // Trigger the System-Prompt preview action
  14 |   const previewBtn = page
  15 |     .locator('button, a')
  16 |     .filter({ hasText: /Preview.*System-?Prompt|System-?Prompt.*Preview/i })
  17 |     .first();
  18 |   await previewBtn.click();
  19 | 
  20 |   const previewAccordion = page.locator('#systemPromptPreviewAccordion');
  21 |   await expect(previewAccordion).toBeVisible({ timeout: 8000 });
  22 | 
  23 |   const items = previewAccordion.locator('.accordion-item');
  24 |   await expect(items).toHaveCount(6);
  25 | 
  26 |   const headersText = (await previewAccordion.locator('.accordion-button').allTextContents()).join(' | ');
  27 |   expect(headersText).toContain('E2E Planner');
  28 |   expect(headersText).toContain('E2E Author');
  29 |   expect(headersText).toContain('E2E Runner System-Prompt');
  30 | 
  31 |   // Close any open modal so the page state stays clean
  32 |   await page.keyboard.press('Escape').catch(() => {});
  33 | });
  34 | 

@clicki-mc-testface
Copy link
Copy Markdown
Collaborator

E2E Test Run for PR #174

Framework: playwright
Preview environment: http://46.225.226.81:20028
Source SHA: 489eea10
Outcome: ❌ FAILED (9/10 passed)

Test Status Duration
tests/bot-edit-preview-accordion-sections.spec.ts
Bot-Edit System-Prompt preview modal shows all 6 accordion sections
❌ FAILED 30.04s
tests/system-prompts-accordion-renders.spec.ts
System-Prompts edit page renders accordion with all 6 sections
✅ PASSED 500 ms
tests/system-prompts-collapse-all-button.spec.ts
Collapse all button closes every prompt section
✅ PASSED 1.70s
tests/system-prompts-edit-and-save.spec.ts
User can edit a prompt inside an accordion section and save successfully
✅ PASSED 2.02s
tests/system-prompts-expand-all-button.spec.ts
Expand all button opens every prompt section
✅ PASSED 1.03s
tests/system-prompts-expand-section.spec.ts
Clicking an accordion header expands a collapsed prompt section
✅ PASSED 1.29s
tests/system-prompts-first-section-open-by-default.spec.ts
Review System-Prompt section is expanded by default on first visit
✅ PASSED 402 ms
tests/system-prompts-multiple-open-allowed.spec.ts
Multiple prompt sections can be open simultaneously
✅ PASSED 2.04s
tests/system-prompts-state-persisted.spec.ts
Expanded/collapsed state persists across page reloads via localStorage
✅ PASSED 1.29s
tests/system-settings-list-collapsible-still-works.spec.ts
System settings list still toggles sections after refactor to shared helper
✅ PASSED 1.79s

1/10 failed

@clicki-mc-testface
Copy link
Copy Markdown
Collaborator

Suite promotion (offer-as-pr)

❌ Promotion failed — git commit/push failed for branch 'ai-tests/pr-174'.

@tmseidel
Copy link
Copy Markdown
Owner Author

@clicki-mc-testface rerun-tests

@clicki-mc-testface
Copy link
Copy Markdown
Collaborator

E2E Test Re-run for PR #174

🔄 Re-running existing test suite — skipping test generation, re-executing the previously generated tests against a fresh deployment.

  • Framework: playwright
  • Suite lifecycle: offer-as-pr

Results will be posted here once the run finishes. Use @bot regenerate-tests <feedback> to re-plan and regenerate the suite.

@clicki-mc-testface
Copy link
Copy Markdown
Collaborator

E2E Test Run for PR #174

Framework: playwright
Preview environment: http://46.225.226.81:20029
Source SHA: 489eea10
Outcome: ❌ FAILED (9/10 passed)

Test Status Duration
tests/bot-edit-preview-accordion-sections.spec.ts
Bot-Edit System-Prompt preview modal shows all 6 accordion sections
❌ FAILED 30.06s
tests/system-prompts-accordion-renders.spec.ts
System-Prompts edit page renders accordion with all 6 sections
✅ PASSED 474 ms
tests/system-prompts-collapse-all-button.spec.ts
Collapse all button closes every prompt section
✅ PASSED 1.67s
tests/system-prompts-edit-and-save.spec.ts
User can edit a prompt inside an accordion section and save successfully
✅ PASSED 1.86s
tests/system-prompts-expand-all-button.spec.ts
Expand all button opens every prompt section
✅ PASSED 1.04s
tests/system-prompts-expand-section.spec.ts
Clicking an accordion header expands a collapsed prompt section
✅ PASSED 1.21s
tests/system-prompts-first-section-open-by-default.spec.ts
Review System-Prompt section is expanded by default on first visit
✅ PASSED 372 ms
tests/system-prompts-multiple-open-allowed.spec.ts
Multiple prompt sections can be open simultaneously
✅ PASSED 2.04s
tests/system-prompts-state-persisted.spec.ts
Expanded/collapsed state persists across page reloads via localStorage
✅ PASSED 1.31s
tests/system-settings-list-collapsible-still-works.spec.ts
System settings list still toggles sections after refactor to shared helper
✅ PASSED 1.83s

1/10 failed (rerun)

@clicki-mc-testface
Copy link
Copy Markdown
Collaborator

Suite promotion (offer-as-pr)

❌ Promotion failed — git commit/push failed for branch 'ai-tests/pr-174'.

@tmseidel
Copy link
Copy Markdown
Owner Author

@clicki-mc-testface rerun-tests

@clicki-mc-testface
Copy link
Copy Markdown
Collaborator

E2E Test Re-run for PR #174

🔄 Re-running existing test suite — skipping test generation, re-executing the previously generated tests against a fresh deployment.

  • Framework: playwright
  • Suite lifecycle: offer-as-pr

Results will be posted here once the run finishes. Use @bot regenerate-tests <feedback> to re-plan and regenerate the suite.

@clicki-mc-testface
Copy link
Copy Markdown
Collaborator

E2E Test Run for PR #174

Framework: playwright
Preview environment: http://46.225.226.81:20030
Source SHA: 489eea10
Outcome: ❌ FAILED (9/10 passed)

Test Status Duration
tests/bot-edit-preview-accordion-sections.spec.ts
Bot-Edit System-Prompt preview modal shows all 6 accordion sections
❌ FAILED 30.08s
tests/system-prompts-accordion-renders.spec.ts
System-Prompts edit page renders accordion with all 6 sections
✅ PASSED 479 ms
tests/system-prompts-collapse-all-button.spec.ts
Collapse all button closes every prompt section
✅ PASSED 1.72s
tests/system-prompts-edit-and-save.spec.ts
User can edit a prompt inside an accordion section and save successfully
✅ PASSED 2.08s
tests/system-prompts-expand-all-button.spec.ts
Expand all button opens every prompt section
✅ PASSED 977 ms
tests/system-prompts-expand-section.spec.ts
Clicking an accordion header expands a collapsed prompt section
✅ PASSED 1.23s
tests/system-prompts-first-section-open-by-default.spec.ts
Review System-Prompt section is expanded by default on first visit
✅ PASSED 434 ms
tests/system-prompts-multiple-open-allowed.spec.ts
Multiple prompt sections can be open simultaneously
✅ PASSED 2.05s
tests/system-prompts-state-persisted.spec.ts
Expanded/collapsed state persists across page reloads via localStorage
✅ PASSED 1.33s
tests/system-settings-list-collapsible-still-works.spec.ts
System settings list still toggles sections after refactor to shared helper
✅ PASSED 1.78s

1/10 failed (rerun)

@clicki-mc-testface
Copy link
Copy Markdown
Collaborator

Suite promotion (offer-as-pr)

✅ Opened follow-up PR #176 on branch ai-tests/pr-174-r47 with 10 generated test file(s).

@tmseidel tmseidel merged commit 92d1513 into develop May 24, 2026
5 checks passed
@tmseidel tmseidel deleted the feature/improve-edit-pages-system-prompts branch May 24, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UX: Improve Edit-Page of System-Prompts

2 participants