Files
task-manager/open-browser.mjs
Paul Nothaft f165ae52e6
continuous-integration/drone/push Build is passing
fix: Mobile responsiveness for Focus Tools & AI chat improvements
Mobile Responsiveness:
- Fix headers on all Focus Tools pages (responsive text sizes, proper spacing)
- Fix BodyDoublingLobby form grid (stacks on mobile)
- Add shrink-0 and min-w-0 to prevent flex overflow issues

AI Chat Improvements:
- Add labelName parameter to createTask tool for easier label assignment
- Auto-match or create labels when labelName is provided
- Improve system prompt to act immediately without confirmation
- Clearer instructions about using tools and handling labels
- Better support for Ollama models with function calling
2026-01-16 15:58:00 +01:00

35 lines
1.0 KiB
JavaScript

import { chromium } from '@playwright/test';
async function openBrowser() {
const browser = await chromium.launch({
headless: false,
slowMo: 100
});
const context = await browser.newContext();
const page = await context.newPage();
// Navigate to app
await page.goto('http://localhost:2100');
await page.waitForTimeout(2000);
// Check if we need to login
const loginInput = page.locator('input[name="username"]');
if (await loginInput.isVisible({ timeout: 3000 }).catch(() => false)) {
console.log('Logging in as admin...');
await page.fill('input[name="username"]', 'admin');
await page.fill('input[name="password"]', 'admin');
await page.click('button[type="submit"]');
await page.waitForTimeout(2000);
console.log('Logged in! Browser is open.');
} else {
console.log('Already logged in or different page. Browser is open.');
}
// Keep browser open
console.log('Press Ctrl+C to close the browser.');
await new Promise(() => {}); // Keep running indefinitely
}
openBrowser().catch(console.error);