-
Notifications
You must be signed in to change notification settings - Fork 0
feat: review app and plan visual improvements #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
KyleKing
merged 20 commits into
yak-shears-py
from
claude/review-app-improvements-01NKAcfkrpTjm2K1FjZpMML9
Nov 30, 2025
Merged
Changes from 3 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
0d58963
feat: Phase 1 - Visual foundation improvements for Scandinavian minim…
claude 699554a
feat: Phase 2 - Comprehensive E2E test coverage
claude 02145e0
feat: Phase 3 - UX improvements with empty states, loading, and acces…
claude 935c949
feat: Phase 4 - Advanced polish, performance, and documentation
claude 2989e44
fix: CI failures - regex syntax and auth URL corrections
claude a583953
fix: Complete E2E test fixes - remaining regex and auth issues
claude 3f9514a
perf: Remove harmful will-change CSS that degrades performance
claude 7e508b4
perf: Upgrade duckdb to 1.4.2 to use pre-built wheels in CI
claude 31224a3
fix: Upgrade beartype to 0.22.2+ for Python 3.14 compatibility
claude 1212f67
test: Fix E2E test failures and update snapshots
claude 21fae23
design: Refine category colors to ultra-subtle tones for true minimalism
claude 02d2a70
docs: Add comprehensive metadata, linking, and data models plan
claude 0ea2c5c
docs: Add technical spikes and MVP implementation plan
claude 7afdfcc
spike: Add frontmatter parser validation (Spike 1/4)
claude 1e8d235
spike: Add link detection and resolution validation (Spike 2/4)
claude c93883b
spike: Add DuckDB link graph query validation (Spike 3/4)
claude 8b288a6
spike: Add metadata panel UI mockup and validation (Spike 4/4)
claude c6a08d7
docs: Add comprehensive spike results and learnings
claude 4834988
feat: Add metadata and linking MVP (Weeks 2-3)
claude c9e861b
test: Add comprehensive unit tests for frontmatter and links modules
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| """E2E tests for authentication functionality.""" | ||
|
|
||
| import pytest | ||
| from playwright.async_api import BrowserContext, Page, expect | ||
|
|
||
|
|
||
| @pytest.mark.playwright | ||
| @pytest.mark.asyncio | ||
| async def test_login_success(context: BrowserContext, page: Page, server_lifecycle): | ||
| """Test successful login flow.""" | ||
| await page.goto("/") | ||
|
|
||
| # Should redirect to login page | ||
| await expect(page).to_have_url("/login") | ||
| await expect(page).to_have_title("Login") | ||
|
|
||
| # Fill in credentials | ||
| await page.fill("input[name='email']", "[email protected]") | ||
| await page.fill("input[name='password']", "secure123") | ||
|
|
||
| # Submit login form | ||
| await page.click("button[type='submit']") | ||
|
|
||
| # Should redirect to yaks page after successful login | ||
| await expect(page).to_have_url("/yaks") | ||
| await expect(page.locator("h1")).to_contain_text("Yaks") | ||
|
|
||
|
|
||
| @pytest.mark.playwright | ||
| @pytest.mark.asyncio | ||
| async def test_login_failure_wrong_password(context: BrowserContext, page: Page, server_lifecycle): | ||
| """Test login failure with wrong password.""" | ||
| await page.goto("/login") | ||
|
|
||
| # Fill in credentials with wrong password | ||
| await page.fill("input[name='email']", "[email protected]") | ||
| await page.fill("input[name='password']", "wrongpassword") | ||
|
|
||
| # Submit login form | ||
| await page.click("button[type='submit']") | ||
|
|
||
| # Should stay on login page and show error | ||
| await expect(page).to_have_url("/login") | ||
| error_message = page.locator(".alert, .error, [role='alert']") | ||
| await expect(error_message).to_be_visible() | ||
|
|
||
|
|
||
| @pytest.mark.playwright | ||
| @pytest.mark.asyncio | ||
| async def test_login_failure_nonexistent_user(context: BrowserContext, page: Page, server_lifecycle): | ||
| """Test login failure with nonexistent user.""" | ||
| await page.goto("/login") | ||
|
|
||
| # Fill in credentials for nonexistent user | ||
| await page.fill("input[name='email']", "[email protected]") | ||
| await page.fill("input[name='password']", "anypassword") | ||
|
|
||
| # Submit login form | ||
| await page.click("button[type='submit']") | ||
|
|
||
| # Should stay on login page and show error | ||
| await expect(page).to_have_url("/login") | ||
| error_message = page.locator(".alert, .error, [role='alert']") | ||
| await expect(error_message).to_be_visible() | ||
|
|
||
|
|
||
| @pytest.mark.playwright | ||
| @pytest.mark.asyncio | ||
| async def test_redirect_to_login_when_not_authenticated(context: BrowserContext, page: Page, server_lifecycle): | ||
| """Test that unauthenticated users are redirected to login.""" | ||
| # Try to access protected pages without logging in | ||
| protected_urls = ["/yaks", "/edit?yak=test.dj", "/search", "/new"] | ||
|
|
||
| for url in protected_urls: | ||
| await page.goto(url) | ||
| # Should redirect to login | ||
| await expect(page).to_have_url("/login", timeout=3000) | ||
|
|
||
|
|
||
| @pytest.mark.playwright | ||
| @pytest.mark.asyncio | ||
| async def test_session_persistence(context: BrowserContext, page: Page, server_lifecycle): | ||
| """Test that session persists across page loads.""" | ||
| # Login | ||
| await page.goto("/login") | ||
| await page.fill("input[name='email']", "[email protected]") | ||
| await page.fill("input[name='password']", "secure123") | ||
| await page.click("button[type='submit']") | ||
| await expect(page).to_have_url("/yaks") | ||
|
|
||
| # Navigate to different pages | ||
| await page.goto("/search") | ||
| await expect(page).to_have_url("/search") | ||
|
|
||
| await page.goto("/yaks") | ||
| await expect(page).to_have_url("/yaks") | ||
|
|
||
| # Reload page | ||
| await page.reload() | ||
| await expect(page).to_have_url("/yaks") | ||
|
|
||
| # Should still be authenticated | ||
| await expect(page.locator("h1")).to_contain_text("Yaks") | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| """E2E tests for new yak creation functionality.""" | ||
|
|
||
| import pytest | ||
| from playwright.async_api import BrowserContext, Page, expect | ||
|
|
||
| from tests.conftest import MOCK_YAK_DIR | ||
|
|
||
| from ._helpers import login | ||
|
|
||
|
|
||
| @pytest.mark.playwright | ||
| @pytest.mark.asyncio | ||
| async def test_new_yak_page_loads(context: BrowserContext, page: Page, server_lifecycle): | ||
| """Test that the new yak page loads correctly.""" | ||
| await login(context, page) | ||
|
|
||
| await page.goto("/new") | ||
|
|
||
| # Check page title | ||
| await expect(page).to_have_title("New Yak") | ||
|
|
||
| # Check form elements are present | ||
| await expect(page.locator("h1")).to_contain_text("Create New Yak") | ||
| await expect(page.locator("#category_select")).to_be_visible() | ||
| await expect(page.locator("#new_category")).to_be_visible() | ||
| await expect(page.locator("button[type='submit']")).to_be_visible() | ||
|
|
||
|
|
||
| @pytest.mark.playwright | ||
| @pytest.mark.asyncio | ||
| async def test_create_new_yak_with_existing_category(context: BrowserContext, page: Page, server_lifecycle): | ||
| """Test creating a new yak with an existing category.""" | ||
| await login(context, page) | ||
|
|
||
| await page.goto("/new") | ||
|
|
||
| # Select an existing category (if available) | ||
| category_options = await page.locator("#category_select option").all() | ||
| if len(category_options) > 1: # More than just the placeholder | ||
| # Select the first real category | ||
| await page.select_option("#category_select", index=1) | ||
|
|
||
| # Submit form | ||
| await page.click("button[type='submit']") | ||
|
|
||
| # Should redirect to edit page | ||
| await expect(page).to_have_url(/\/edit\?yak=.*/) | ||
|
|
||
|
|
||
| @pytest.mark.playwright | ||
| @pytest.mark.asyncio | ||
| async def test_create_new_yak_with_new_category(context: BrowserContext, page: Page, server_lifecycle): | ||
| """Test creating a new yak with a new category.""" | ||
| await login(context, page) | ||
|
|
||
| await page.goto("/new") | ||
|
|
||
| # Enter a new category name | ||
| test_category = "test-e2e-category" | ||
| await page.fill("#new_category", test_category) | ||
|
|
||
| # Submit form | ||
| await page.click("button[type='submit']") | ||
|
|
||
| # Should redirect to edit page | ||
| await expect(page).to_have_url(/\/edit\?yak=.*/) | ||
|
|
||
|
|
||
| @pytest.mark.playwright | ||
| @pytest.mark.asyncio | ||
| async def test_new_yak_cancel_navigation(context: BrowserContext, page: Page, server_lifecycle): | ||
| """Test that cancel button navigates back to yaks page.""" | ||
| await login(context, page) | ||
|
|
||
| await page.goto("/new") | ||
|
|
||
| # Click cancel | ||
| cancel_button = page.locator("a:has-text('Cancel')") | ||
| await cancel_button.click() | ||
|
|
||
| # Should navigate to yaks page | ||
| await expect(page).to_have_url("/yaks") | ||
|
|
||
|
|
||
| @pytest.mark.playwright | ||
| @pytest.mark.asyncio | ||
| async def test_new_yak_from_navigation(context: BrowserContext, page: Page, server_lifecycle): | ||
| """Test navigating to new yak page from main navigation.""" | ||
| await login(context, page) | ||
|
|
||
| await page.goto("/yaks") | ||
|
|
||
| # Click "New" in navigation | ||
| new_link = page.locator("a.nav__link:has-text('New')") | ||
| await new_link.click() | ||
|
|
||
| # Should navigate to new page | ||
| await expect(page).to_have_url("/new") | ||
| await expect(page).to_have_title("New Yak") | ||
|
|
||
|
|
||
| @pytest.mark.playwright | ||
| @pytest.mark.asyncio | ||
| async def test_new_yak_requires_authentication(context: BrowserContext, page: Page, server_lifecycle): | ||
| """Test that new yak page requires authentication.""" | ||
| # Try to access without logging in | ||
| await page.goto("/new") | ||
|
|
||
| # Should redirect to login | ||
| await expect(page).to_have_url("/login") | ||
KyleKing marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.