Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(properties): keep keyboard focus through inline value saves (#9335)
gbirman88590f265c8b
diff --git a/apps/web/AGENTS.md b/apps/web/AGENTS.mdindex 29395dd65e..e7fdb34706 100644--- a/apps/web/AGENTS.md+++ b/apps/web/AGENTS.md@@ -877,6 +877,14 @@ See the [download walkthrough](../../docs/agent-guide/files.md#downloading-files- Keep transient toasts in their bounded stack and persistent prompts/reminders in separate regions; preserve keyboard dismissal, full mobile descriptions, and remaining-time pause on hover/focus. Mobile toasts dismiss by swiping left or right and have no corner close button. Phone prompts stay in their own stack under the modal layer, never on `z-toast-region`, and never hide with a document-wide `:has()` (#8840).- Notification sounds are off by default and saved per user per device; map each new notification event in `features/notification-sounds/core/categories.ts` and keep system alerts silent when Macro plays its own sound. See the [notification sounds walkthrough](../../docs/agent-guide/notifications.md#notification-sounds).+### Inline property values++Inline property fields stay `readOnly`, never `disabled`, while they save: a+browser moves focus off a disabled field, so a failed save would strand it. Enter+and Escape return focus to the value through `Property.Root`; tabbing or clicking+away leaves focus where the user put it. The backend-free regression is+`bunx playwright test --config src/features/property/editors/inline/browser-test/playwright.config.ts`.+### Sidebar tag draggingEmail and Calls sidebar tags can be dragged onto taggable desktop list rows.diff --git a/apps/web/src/features/property/editors/hooks/useInlineEditor.ts b/apps/web/src/features/property/editors/hooks/useInlineEditor.tsindex b2a8f469a9..f15ca69a1f 100644--- a/apps/web/src/features/property/editors/hooks/useInlineEditor.ts+++ b/apps/web/src/features/property/editors/hooks/useInlineEditor.ts@@ -1,3 +1,4 @@+import { fireAndForget } from '@core/util/fireAndForget';import { type Accessor, createSignal, type Setter } from 'solid-js';import { NUMBER_DECIMAL_PLACES } from '../../constants';import { useProperty } from '../../core/context';@@ -16,8 +17,8 @@ export function useInlineEditor(): {setInputValue: Setter<string>;isSaving: Accessor<boolean>;startEdit: () => void;- cancelEdit: () => void;save: () => Promise<void>;+ handleKeyDown: (e: KeyboardEvent) => void;} {const ctx = useProperty();const [isEditing, setIsEditing] = createSignal(false);@@ -81,13 +82,38 @@ export function useInlineEditor(): {}};+ // Enter and Escape remove the focused field, which drops focus to the page.+ // Tabbing or clicking away already put focus where the user wanted it.+ const returnFocus = () => {+ if (document.activeElement === document.body) ctx.closeEditor();+ };++ const saveFromKeyboard = async () => {+ await save();+ if (!isEditing()) returnFocus();+ };++ const handleKeyDown = (e: KeyboardEvent) => {+ // An IME owns Enter and Escape while it composes; WebKit reports its+ // confirming keydown as 229 after composition ends.+ if (e.isComposing || e.keyCode === 229) return;+ if (e.key === 'Enter') {+ e.preventDefault();+ fireAndForget(saveFromKeyboard(), 'property-editor');+ } else if (e.key === 'Escape' && !isSaving()) {+ e.preventDefault();+ cancelEdit();+ returnFocus();+ }+ };+return {isEditing,inputValue,setInputValue,isSaving,startEdit,- cancelEdit,save,+ handleKeyDown,};}diff --git a/apps/web/src/features/property/editors/inline/InlineBooleanEditor.tsx b/apps/web/src/features/property/editors/inline/InlineBooleanEditor.tsxindex ca6153345b..902d217a41 100644--- a/apps/web/src/features/property/editors/inline/InlineBooleanEditor.tsx+++ b/apps/web/src/features/property/editors/inline/InlineBooleanEditor.tsx@@ -18,7 +18,7 @@ export function InlineBooleanEditor() {<buttontype="button"onClick={() => !isReadOnly() && !isSaving() && toggle()}- disabled={isSaving() || isReadOnly()}+ disabled={isReadOnly()}class="flex items-center justify-end p-1"classList={{'cursor-default': isReadOnly() || isSaving(),diff --git a/apps/web/src/features/property/editors/inline/InlineEditor.test.tsx b/apps/web/src/features/property/editors/inline/InlineEditor.test.tsxnew file mode 100644index 0000000000..065dbe4b3a--- /dev/null+++ b/apps/web/src/features/property/editors/inline/InlineEditor.test.tsx@@ -0,0 +1,286 @@+import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';+import { afterEach, describe, expect, it, vi } from 'vitest';+import { Root } from '../../core/Root';+import type { Property } from '../../types';+import { InlineEditor } from './InlineEditor';++vi.mock('@core/component/HoverCard', () => ({+ useHoldParentHoverCardOpen: () => {},+}));+vi.mock('@core/signal/unfurl', () => ({+ useUnfurl: () => [() => undefined],+}));++const BASE = {+ propertyDefinitionId: 'definition',+ propertyId: 'assignment',+ displayName: 'Value',+ isMultiSelect: false,+ owner: { scope: 'system' },+ createdAt: new Date(0),+ updatedAt: new Date(0),+} as const;++const NUMBER: Property = { ...BASE, valueType: 'NUMBER', value: 3 };+const TEXT: Property = { ...BASE, valueType: 'STRING', value: 'Draft' };+const LINKS: Property = {+ ...BASE,+ valueType: 'LINK',+ isMultiSelect: true,+ value: ['https://example.com/one'],+};+const LINK: Property = { ...BASE, valueType: 'LINK', value: null };+const FLAG: Property = { ...BASE, valueType: 'BOOLEAN', value: false };++function setup(property: Property) {+ const saves: PromiseWithResolvers<void>[] = [];+ const onSave = vi.fn(() => {+ const save = Promise.withResolvers<void>();+ saves.push(save);+ return save.promise;+ });+ render(() => (+ <>+ <Root property={property} canEdit onSave={onSave}>+ <InlineEditor />+ </Root>+ <button>After</button>+ </>+ ));+ return {+ saves,+ onSave,+ after: screen.getByRole('button', { name: 'After' }),+ };+}++const focused = () => document.activeElement;+// Root returns focus from a timer scheduled after the save's promise settles.+const settle = async () => {+ for (let tick = 0; tick < 3; tick++) {+ await new Promise((resolve) => setTimeout(resolve, 0));+ }+};++const fieldOf = (container: HTMLElement) => {+ const field = container.querySelector<HTMLInputElement | HTMLTextAreaElement>(+ 'input, textarea'+ );+ if (!field) throw new Error('No field is open');+ return field;+};++async function startEditing(trigger: HTMLElement) {+ fireEvent.click(trigger);+ await settle();+ const field = fieldOf(document.body);+ expect(focused()).toBe(field);+ return field;+}++function type(field: HTMLInputElement | HTMLTextAreaElement, value: string) {+ field.value = value;+ fireEvent.input(field);+}++afterEach(cleanup);++describe.each([+ ['number', NUMBER, '3', '4'],+ ['text', TEXT, 'Draft', 'Final'],+])('%s value', (_name, property, current, next) => {+ const value = (label: string) => screen.getByRole('button', { name: label });++ it('returns focus to the value after Enter saves', async () => {+ const { saves, onSave } = setup(property);+ const field = await startEditing(value(current));++ type(field, next);+ fireEvent.keyDown(field, { key: 'Enter' });+ expect(onSave).toHaveBeenCalledOnce();++ // A disabled field loses focus in browsers, though not in jsdom.+ expect(field.disabled).toBe(false);+ expect(field.readOnly).toBe(true);+ expect(focused()).toBe(field);++ saves[0]!.resolve();+ await settle();+ expect(focused()).toBe(value(next));+ });++ it('returns focus to the value after Enter changes nothing', async () => {+ const { onSave } = setup(property);+ const field = await startEditing(value(current));++ fireEvent.keyDown(field, { key: 'Enter' });+ await settle();++ expect(onSave).not.toHaveBeenCalled();+ expect(focused()).toBe(value(current));+ });++ it('returns focus to the value after Escape', async () => {+ const { onSave } = setup(property);+ const field = await startEditing(value(current));++ type(field, next);+ fireEvent.keyDown(field, { key: 'Escape' });+ await settle();++ expect(onSave).not.toHaveBeenCalled();+ expect(focused()).toBe(value(current));+ });++ it('ignores Enter and Escape while a save runs', async () => {+ const { saves, onSave } = setup(property);+ const field = await startEditing(value(current));++ type(field, next);+ fireEvent.keyDown(field, { key: 'Enter' });+ fireEvent.keyDown(field, { key: 'Enter' });+ fireEvent.keyDown(field, { key: 'Escape' });++ expect(onSave).toHaveBeenCalledOnce();+ expect(field.isConnected).toBe(true);+ saves[0]!.resolve();+ await settle();+ });++ it('leaves Enter and Escape to an IME while it composes', async () => {+ const { onSave } = setup(property);+ const field = await startEditing(value(current));++ type(field, next);+ fireEvent.keyDown(field, { key: 'Enter', isComposing: true });+ fireEvent.keyDown(field, { key: 'Enter', keyCode: 229 });+ fireEvent.keyDown(field, { key: 'Escape', isComposing: true });+ await settle();++ expect(onSave).not.toHaveBeenCalled();+ expect(field.isConnected).toBe(true);+ expect(focused()).toBe(field);+ });++ it('keeps the field open and focused when the save fails', async () => {+ const { saves } = setup(property);+ const field = await startEditing(value(current));++ type(field, next);+ fireEvent.keyDown(field, { key: 'Enter' });+ saves[0]!.reject(new Error('Save failed'));+ await settle();++ expect(focused()).toBe(field);+ expect(field.readOnly).toBe(false);+ });++ it('leaves focus on the next control when Tab saves', async () => {+ const { saves, after } = setup(property);+ const field = await startEditing(value(current));++ type(field, next);+ after.focus();+ saves[0]!.resolve();+ await settle();++ expect(focused()).toBe(after);+ });++ it('leaves focus on a control taken while the save ran', async () => {+ const { saves, after } = setup(property);+ const field = await startEditing(value(current));++ type(field, next);+ fireEvent.keyDown(field, { key: 'Enter' });+ after.focus();+ saves[0]!.resolve();+ await settle();++ expect(focused()).toBe(after);+ });+});++describe('link value', () => {+ const add = () => screen.getByRole('button', { name: '+' });+ const URL_TWO = 'example.com/two';++ it('returns focus to the add button after Enter adds a link', async () => {+ const { saves } = setup(LINKS);+ const field = await startEditing(add());++ type(field, URL_TWO);+ fireEvent.keyDown(field, { key: 'Enter' });+ expect(field.disabled).toBe(false);+ expect(focused()).toBe(field);++ saves[0]!.resolve();+ await settle();+ expect(focused()).toBe(add());+ });++ it('returns focus to the chip when no add button is left', async () => {+ const { saves } = setup(LINK);+ const field = await startEditing(add());++ type(field, URL_TWO);+ fireEvent.keyDown(field, { key: 'Enter' });+ saves[0]!.resolve();+ await settle();++ expect(focused()).toBe(screen.getByRole('button', { name: 'example.com' }));+ });++ it('returns focus to the add button after Escape', async () => {+ setup(LINKS);+ const field = await startEditing(add());++ fireEvent.keyDown(field, { key: 'Escape' });+ await settle();++ expect(focused()).toBe(add());+ });++ it('leaves Enter to an IME while it composes', async () => {+ const { onSave } = setup(LINKS);+ const field = await startEditing(add());++ type(field, URL_TWO);+ fireEvent.keyDown(field, { key: 'Enter', isComposing: true });+ await settle();++ expect(onSave).not.toHaveBeenCalled();+ expect(focused()).toBe(field);+ });++ it('adds once when focus leaves while the save runs', async () => {+ const { saves, onSave, after } = setup(LINKS);+ const field = await startEditing(add());++ type(field, URL_TWO);+ fireEvent.keyDown(field, { key: 'Enter' });+ after.focus();+ await new Promise((resolve) => setTimeout(resolve, 120));++ expect(onSave).toHaveBeenCalledOnce();+ expect(screen.queryByText('This URL has already been added')).toBeNull();+ saves[0]!.resolve();+ await settle();+ expect(focused()).toBe(after);+ });+});++it('keeps a checkbox focused through its save', async () => {+ const { saves, onSave } = setup(FLAG);+ const toggle = screen.getAllByRole('button')[0] as HTMLButtonElement;+ toggle.focus();++ fireEvent.click(toggle);+ fireEvent.click(toggle);++ expect(onSave).toHaveBeenCalledOnce();+ expect(toggle.disabled).toBe(false);+ saves[0]!.resolve();+ await settle();+ expect(focused()).toBe(toggle);+});diff --git a/apps/web/src/features/property/editors/inline/InlineLinkEditor.tsx b/apps/web/src/features/property/editors/inline/InlineLinkEditor.tsxindex 15172c9d4c..dd1d3149b5 100644--- a/apps/web/src/features/property/editors/inline/InlineLinkEditor.tsx+++ b/apps/web/src/features/property/editors/inline/InlineLinkEditor.tsx@@ -30,6 +30,7 @@ export function InlineLinkEditor() {const [hoveredLink, setHoveredLink] = createSignal<string | null>(null);const [isSaving, setIsSaving] = createSignal(false);const [badLinks, setBadLinks] = createStore<Record<string, true>>({});+ let addButton: HTMLButtonElement | undefined;const property = () => ctx.property();const isReadOnly = () => property().isMetadata || !ctx.canEdit();@@ -65,6 +66,7 @@ export function InlineLinkEditor() {};const handleAddLink = async () => {+ if (isSaving()) return;const raw = inputValue().trim();if (!raw) {cancelAdding();@@ -111,13 +113,31 @@ export function InlineLinkEditor() {}};+ // Enter and Escape remove the focused input, which drops focus to the page.+ // A single link has no add button left, so focus goes to its chip.+ const returnFocus = () => {+ if (document.activeElement !== document.body) return;+ if (addButton?.isConnected) addButton.focus();+ else ctx.closeEditor();+ };++ const addFromKeyboard = async () => {+ await handleAddLink();+ if (!isAdding()) returnFocus();+ };+const handleKeyDown = (e: KeyboardEvent) => {+ // An IME owns Enter and Escape while it composes; WebKit reports its+ // confirming keydown as 229 after composition ends.+ if (e.isComposing || e.keyCode === 229) return;if (e.key === 'Enter') {e.preventDefault();- fireAndForget(handleAddLink(), 'property-editor');+ fireAndForget(addFromKeyboard(), 'property-editor');} else if (e.key === 'Escape') {+ if (isSaving()) return;e.preventDefault();cancelAdding();+ returnFocus();} else if (error()) {setError(null);}@@ -156,6 +176,7 @@ export function InlineLinkEditor() {fallback={<Show when={property().isMultiSelect || links().length === 0}><button+ ref={addButton}type="button"class={ADD_BUTTON_CLASS}onClick={startAdding}@@ -179,7 +200,7 @@ export function InlineLinkEditor() {}, 100);}}placeholder="Enter URL..."- disabled={isSaving()}+ readOnly={isSaving()}class="text-left px-2 py-0.5 bg-transparent focus:outline-none text-ink inline-block shrink-0 rounded-sm"/><Show when={error()}>diff --git a/apps/web/src/features/property/editors/inline/InlineNumberEditor.tsx b/apps/web/src/features/property/editors/inline/InlineNumberEditor.tsxindex ec6c86ac15..4d9698bdd8 100644--- a/apps/web/src/features/property/editors/inline/InlineNumberEditor.tsx+++ b/apps/web/src/features/property/editors/inline/InlineNumberEditor.tsx@@ -1,4 +1,3 @@-import { fireAndForget } from '@core/util/fireAndForget';import { Show } from 'solid-js';import { useProperty } from '../../core/context';import { PropertyEmpty } from '../../extractors/PropertyEmpty';@@ -23,16 +22,6 @@ export function InlineNumberEditor() {const display = () =>hasValue() ? formatNumber(property().value as number) : '';- const handleKeyDown = (e: KeyboardEvent) => {- if (e.key === 'Enter') {- e.preventDefault();- fireAndForget(editor.save(), 'property-editor');- } else if (e.key === 'Escape') {- e.preventDefault();- editor.cancelEdit();- }- };-return (<Showwhen={editor.isEditing()}@@ -59,8 +48,8 @@ export function InlineNumberEditor() {value={editor.inputValue()}onInput={(e) => editor.setInputValue(e.currentTarget.value)}onBlur={editor.save}- onKeyDown={handleKeyDown}- disabled={editor.isSaving()}+ onKeyDown={editor.handleKeyDown}+ readOnly={editor.isSaving()}placeholder="Enter number..."class="w-full text-left text-ink px-2 py-0.5 bg-transparent focus:outline-none rounded-sm"/>diff --git a/apps/web/src/features/property/editors/inline/InlineTextEditor.tsx b/apps/web/src/features/property/editors/inline/InlineTextEditor.tsxindex 3ad78b2445..d11ef93880 100644--- a/apps/web/src/features/property/editors/inline/InlineTextEditor.tsx+++ b/apps/web/src/features/property/editors/inline/InlineTextEditor.tsx@@ -1,4 +1,3 @@-import { fireAndForget } from '@core/util/fireAndForget';import { Show } from 'solid-js';import { useProperty } from '../../core/context';import { PropertyEmpty } from '../../extractors/PropertyEmpty';@@ -25,16 +24,6 @@ export function InlineTextEditor() {return typeof v === 'string' && v.length > 0;};- const handleKeyDown = (e: KeyboardEvent) => {- if (e.key === 'Enter') {- e.preventDefault();- fireAndForget(editor.save(), 'property-editor');- } else if (e.key === 'Escape') {- e.preventDefault();- editor.cancelEdit();- }- };-return (<Showwhen={editor.isEditing()}@@ -67,8 +56,8 @@ export function InlineTextEditor() {value={editor.inputValue()}onInput={(e) => editor.setInputValue(e.currentTarget.value)}onBlur={editor.save}- onKeyDown={handleKeyDown}- disabled={editor.isSaving()}+ onKeyDown={editor.handleKeyDown}+ readOnly={editor.isSaving()}class="w-full field-sizing-content resize-none text-left text-ink px-2 py-0.5 bg-transparent focus:outline-none rounded-sm"/></Show>diff --git a/apps/web/src/features/property/editors/inline/browser-test/inline-focus.browser.e2e.ts b/apps/web/src/features/property/editors/inline/browser-test/inline-focus.browser.e2e.tsnew file mode 100644index 0000000000..77e4051829--- /dev/null+++ b/apps/web/src/features/property/editors/inline/browser-test/inline-focus.browser.e2e.ts@@ -0,0 +1,185 @@+import { expect, type Page, test } from '@playwright/test';++async function open(page: Page) {+ await page.route('**/*', async (route) => {+ if (new URL(route.request().url()).hostname === 'localhost')+ await route.continue();+ else await route.fulfill({ status: 401, body: '{}' });+ });+ await page.routeWebSocket('**/*', (socket) => socket.close());+ await page.goto(+ '/src/features/property/editors/inline/browser-test/inline-focus.html'+ );+ await expect(page.getByTestId('number')).toBeVisible({ timeout: 60_000 });+}++const field = (page: Page, id: string) =>+ page.getByTestId(id).locator('input, textarea');+const value = (page: Page, id: string) =>+ page.getByTestId(id).locator('button').first();++async function edit(page: Page, id: string) {+ await value(page, id).focus();+ await page.keyboard.press('Enter');+ await expect(field(page, id)).toBeFocused();+}++const finishSave = (page: Page) => page.evaluate(() => window.finishSave());+const failSave = (page: Page) => page.evaluate(() => window.failSave());+const waitForSave = (page: Page) =>+ expect.poll(() => page.evaluate(() => window.heldSaves())).toBe(1);++for (const [id, next] of [+ ['number', '4'],+ ['text', 'Final'],+] as const) {+ test.describe(`${id} value`, () => {+ test.beforeEach(({ page }) => open(page));++ test('Enter hands focus back to the value once it saves', async ({+ page,+ }) => {+ await edit(page, id);+ await field(page, id).fill(next);+ await page.keyboard.press('Enter');+ await waitForSave(page);+ await expect(field(page, id)).toBeFocused();++ await finishSave(page);+ await expect(value(page, id)).toHaveText(next);+ await expect(value(page, id)).toBeFocused();++ await page.keyboard.press('Tab');+ await expect(page.getByTestId(`after-${id}`)).toBeFocused();+ });++ test('Enter on an unchanged value and Escape hand focus back', async ({+ page,+ }) => {+ await edit(page, id);+ await page.keyboard.press('Enter');+ await expect(value(page, id)).toBeFocused();++ await page.keyboard.press('Enter');+ await expect(field(page, id)).toBeFocused();+ await field(page, id).fill(next);+ await page.keyboard.press('Escape');+ await expect(value(page, id)).toBeFocused();+ await expect(value(page, id)).not.toHaveText(next);+ });++ test('a failed save leaves the field focused to try again', async ({+ page,+ }) => {+ await edit(page, id);+ await field(page, id).fill(next);+ await page.keyboard.press('Enter');+ await waitForSave(page);+ await failSave(page);++ await expect(field(page, id)).toBeFocused();+ await expect(field(page, id)).toBeEditable();+ await page.keyboard.press('Enter');+ await waitForSave(page);+ await finishSave(page);+ await expect(value(page, id)).toBeFocused();+ });++ test('Tab while the save runs stays on the next control', async ({+ page,+ }) => {+ await edit(page, id);+ await field(page, id).fill(next);+ await page.keyboard.press('Enter');+ await waitForSave(page);+ await page.keyboard.press('Tab');+ await expect(page.getByTestId(`after-${id}`)).toBeFocused();++ await finishSave(page);+ await expect(value(page, id)).toHaveText(next);+ await expect(page.getByTestId(`after-${id}`)).toBeFocused();+ });++ test('leaving the field by Tab saves without pulling focus back', async ({+ page,+ }) => {+ await edit(page, id);+ await field(page, id).fill(next);+ await page.keyboard.press('Tab');+ await waitForSave(page);+ await finishSave(page);++ await expect(value(page, id)).toHaveText(next);+ await expect(page.getByTestId(`after-${id}`)).toBeFocused();+ });+ });+}++test.describe('link value', () => {+ test.beforeEach(({ page }) => open(page));++ const add = (page: Page, id: string) =>+ page.getByTestId(id).getByRole('button', { name: '+', exact: true });++ test('adding to a list hands focus to the next add button', async ({+ page,+ }) => {+ await add(page, 'links').focus();+ await page.keyboard.press('Enter');+ await expect(field(page, 'links')).toBeFocused();+ await field(page, 'links').fill('example.com/two');+ await page.keyboard.press('Enter');+ await waitForSave(page);+ await expect(field(page, 'links')).toBeFocused();++ await finishSave(page);+ await expect(add(page, 'links')).toBeFocused();+ });++ test('a single link hands focus to its chip', async ({ page }) => {+ await add(page, 'link').focus();+ await page.keyboard.press('Enter');+ await field(page, 'link').fill('example.com/one');+ await page.keyboard.press('Enter');+ await waitForSave(page);+ await finishSave(page);++ await expect(page.getByTestId('link').locator('button')).toBeFocused();+ });++ test('Escape hands focus back to the add button', async ({ page }) => {+ await add(page, 'links').focus();+ await page.keyboard.press('Enter');+ await expect(field(page, 'links')).toBeFocused();+ await page.keyboard.press('Escape');+ await expect(add(page, 'links')).toBeFocused();+ });++ test('a failed save leaves the field focused', async ({ page }) => {+ await add(page, 'links').focus();+ await page.keyboard.press('Enter');+ await field(page, 'links').fill('example.com/two');+ await page.keyboard.press('Enter');+ await waitForSave(page);+ await failSave(page);++ await expect(field(page, 'links')).toBeFocused();+ await expect(field(page, 'links')).toBeEditable();+ });+});++test('a checkbox keeps focus through its save', async ({ page }) => {+ await open(page);+ const toggle = value(page, 'flag');+ await toggle.focus();+ await page.keyboard.press('Space');+ await waitForSave(page);+ await expect(toggle).toBeFocused();++ await finishSave(page);+ await expect(toggle).toBeFocused();+ await page.keyboard.press('Space');+ await waitForSave(page);+ await finishSave(page);+ await expect(toggle).toBeFocused();+});diff --git a/apps/web/src/features/property/editors/inline/browser-test/inline-focus.html b/apps/web/src/features/property/editors/inline/browser-test/inline-focus.htmlnew file mode 100644index 0000000000..4f896438c2--- /dev/null+++ b/apps/web/src/features/property/editors/inline/browser-test/inline-focus.html@@ -0,0 +1 @@+<!doctype html><html><head><meta charset="UTF-8"><title>Inline property focus fixture</title></head><body><div id="root"></div><script type="module" src="./inline-focus.tsx"></script></body></html>diff --git a/apps/web/src/features/property/editors/inline/browser-test/inline-focus.tsx b/apps/web/src/features/property/editors/inline/browser-test/inline-focus.tsxnew file mode 100644index 0000000000..01909795d6--- /dev/null+++ b/apps/web/src/features/property/editors/inline/browser-test/inline-focus.tsx@@ -0,0 +1,103 @@+import '@app/index.css';+import { Property } from '@property';+import type { PropertyApiValues, Property as PropertyT } from '@property/types';+import { withApiValues } from '@property/utils/transforms';+import { createSignal, For } from 'solid-js';+import { render } from 'solid-js/web';++const BASE = {+ isMultiSelect: false,+ owner: { scope: 'system' },+ createdAt: new Date(0),+ updatedAt: new Date(0),+} as const;++const PROPERTIES: PropertyT[] = [+ {+ ...BASE,+ propertyId: 'number',+ propertyDefinitionId: 'number',+ displayName: 'Points',+ valueType: 'NUMBER',+ value: 3,+ },+ {+ ...BASE,+ propertyId: 'text',+ propertyDefinitionId: 'text',+ displayName: 'Summary',+ valueType: 'STRING',+ value: 'Draft',+ },+ {+ ...BASE,+ propertyId: 'links',+ propertyDefinitionId: 'links',+ displayName: 'Links',+ valueType: 'LINK',+ isMultiSelect: true,+ value: ['https://example.com/one'],+ },+ {+ ...BASE,+ propertyId: 'link',+ propertyDefinitionId: 'link',+ displayName: 'Link',+ valueType: 'LINK',+ value: null,+ },+ {+ ...BASE,+ propertyId: 'flag',+ propertyDefinitionId: 'flag',+ displayName: 'Done',+ valueType: 'BOOLEAN',+ value: false,+ },+];++type HeldSave = PromiseWithResolvers<void>;+const HELD: HeldSave[] = [];++declare global {+ interface Window {+ finishSave: () => void;+ failSave: () => void;+ heldSaves: () => number;+ }+}+window.finishSave = () => HELD.shift()?.resolve();+window.failSave = () => HELD.shift()?.reject(new Error('Save failed'));+window.heldSaves = () => HELD.length;++function Row(props: { property: PropertyT }) {+ const [property, setProperty] = createSignal(props.property);+ const save = async (saved: PropertyT, value: PropertyApiValues) => {+ const hold = Promise.withResolvers<void>();+ HELD.push(hold);+ await hold.promise;+ setProperty(withApiValues(saved, value));+ };+ return (+ <div class="flex items-center gap-2">+ <div class="w-80" data-testid={props.property.propertyId}>+ <Property.Root property={property()} canEdit onSave={save}>+ <Property.InlineEditor />+ </Property.Root>+ </div>+ <button data-testid={`after-${props.property.propertyId}`}>After</button>+ </div>+ );+}++function Fixture() {+ return (+ <main class="flex flex-col gap-4 p-8">+ <For each={PROPERTIES}>{(property) => <Row property={property} />}</For>+ </main>+ );+}++const root = document.getElementById('root');+if (!root) throw new Error('Fixture root missing');+render(() => <Fixture />, root);diff --git a/apps/web/src/features/property/editors/inline/browser-test/playwright.config.ts b/apps/web/src/features/property/editors/inline/browser-test/playwright.config.tsnew file mode 100644index 0000000000..6c642c0b10--- /dev/null+++ b/apps/web/src/features/property/editors/inline/browser-test/playwright.config.ts@@ -0,0 +1,23 @@+import { fileURLToPath } from 'node:url';+import { defineConfig } from '@playwright/test';++const PORT = process.env.INLINE_EDITOR_TEST_PORT ?? '3501';+export default defineConfig({+ testDir: fileURLToPath(new URL('.', import.meta.url)),+ testMatch: '*.browser.e2e.ts',+ workers: 1,+ timeout: 120_000,+ use: {+ baseURL: `http://localhost:${PORT}`,+ launchOptions: {+ executablePath: process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH,+ },+ },+ webServer: {+ command: `MACRO_DEV_HTTPS=false bunx vite --port ${PORT} --strictPort`,+ cwd: fileURLToPath(new URL('../../../../../../', import.meta.url)),+ url: `http://localhost:${PORT}/app/`,+ reuseExistingServer: false,+ timeout: 60_000,+ },+});diff --git a/docs/agent-guide/tasks.md b/docs/agent-guide/tasks.mdindex 2eb7922614..980d6f2c38 100644--- a/docs/agent-guide/tasks.md+++ b/docs/agent-guide/tasks.md@@ -112,6 +112,11 @@ the originating tab breadcrumb, a task tab, or a tag to return to the list.Shift-click a row or favorite to open it in a new splitinstead. Keyboard list navigation only moves focus; press Enter to open the focused task.+Number, text, and link values in the Properties side panel edit in place. Enter+saves and Escape cancels, and both return focus to the value, or to **+** on a link+list, so the keyboard stays on the row. A failed save leaves the field open and+focused. Tab or a click elsewhere saves and leaves focus where it went.+In the task's Properties side panel, hover or focus a row for **Pin below title**or **Unpin from title**. Pinning adds the property to the title row; unpinning keepsits saved value and the side-panel row. The title pill's hover card also offers