From d92077e4f71cb8282354965754ea4d05dcc40256 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Wed, 24 Dec 2025 19:38:27 -0500 Subject: [PATCH] fix: remove orphaned debug statements causing build errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove incomplete console.log cleanup artifacts across 17 files - Fix orphaned object literals left from previous debug removal - Prefix unused callback parameters with underscores - Update Drawfast shape to side-by-side INPUT/OUTPUT layout (900x500) - Remove unused overlay toggle from Drawfast controls Files fixed: AutomergeToTLStore, TLStoreToAutomerge, useAutomergeSyncRepo, FathomMeetingsPanel, NetworkGraphPanel, sessionPersistence, quartzSync, testClientConfig, useCollaboration, Board, DrawfastShapeUtil, FathomMeetingsBrowserShapeUtil, MapShapeUtil, FathomMeetingsTool, HolonTool, overrides, githubSetupValidator 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/automerge/AutomergeToTLStore.ts | 14 - src/automerge/TLStoreToAutomerge.ts | 116 --------- src/automerge/useAutomergeSyncRepo.ts | 24 -- src/components/FathomMeetingsPanel.tsx | 6 - .../networking/NetworkGraphPanel.tsx | 2 +- src/lib/auth/sessionPersistence.ts | 4 - src/lib/githubSetupValidator.ts | 16 -- src/lib/quartzSync.ts | 20 +- src/lib/testClientConfig.ts | 10 +- src/open-mapping/hooks/useCollaboration.ts | 10 +- src/routes/Board.tsx | 49 ---- src/shapes/DrawfastShapeUtil.tsx | 245 ++++++++++-------- src/shapes/FathomMeetingsBrowserShapeUtil.tsx | 7 - src/shapes/MapShapeUtil.tsx | 8 - src/tools/FathomMeetingsTool.ts | 5 - src/tools/HolonTool.ts | 21 +- src/ui/overrides.tsx | 6 +- 17 files changed, 145 insertions(+), 418 deletions(-) diff --git a/src/automerge/AutomergeToTLStore.ts b/src/automerge/AutomergeToTLStore.ts index 2b1aed7..484a215 100644 --- a/src/automerge/AutomergeToTLStore.ts +++ b/src/automerge/AutomergeToTLStore.ts @@ -442,20 +442,6 @@ export function applyAutomergePatchesToTLStore( // put / remove the records in the store // Log patch application for debugging - // DEBUG: Log shape updates being applied to store - toPut.forEach(record => { - if (record.typeName === 'shape' && (record as any).props?.w) { - w: (record as any).props.w, - h: (record as any).props.h, - x: (record as any).x, - y: (record as any).y - }) - } - }) - - if (failedRecords.length > 0) { - } - if (failedRecords.length > 0) { console.error("Failed to sanitize records:", failedRecords) } diff --git a/src/automerge/TLStoreToAutomerge.ts b/src/automerge/TLStoreToAutomerge.ts index bf9aab5..39ebb5c 100644 --- a/src/automerge/TLStoreToAutomerge.ts +++ b/src/automerge/TLStoreToAutomerge.ts @@ -462,44 +462,6 @@ export function applyTLStoreChangesToAutomerge( originalX = (record as any).x originalY = (record as any).y } - // DEBUG: Log richText, meta.text, and Obsidian note properties before sanitization - if (record.typeName === 'shape') { - if (record.type === 'geo' && (record.props as any)?.richText) { - hasRichText: !!(record.props as any).richText, - richTextType: typeof (record.props as any).richText, - richTextContent: Array.isArray((record.props as any).richText) ? 'array' : (record.props as any).richText?.content ? 'object with content' : 'object without content' - }) - } - if (record.type === 'geo' && (record.meta as any)?.text !== undefined) { - hasMetaText: !!(record.meta as any).text, - metaTextValue: (record.meta as any).text, - metaTextType: typeof (record.meta as any).text - }) - } - if (record.type === 'note' && (record.props as any)?.richText) { - hasRichText: !!(record.props as any).richText, - richTextType: typeof (record.props as any).richText, - richTextContent: Array.isArray((record.props as any).richText) ? 'array' : (record.props as any).richText?.content ? 'object with content' : 'object without content', - richTextContentLength: Array.isArray((record.props as any).richText?.content) ? (record.props as any).richText.content.length : 'not array' - }) - } - if (record.type === 'arrow' && (record.props as any)?.text !== undefined) { - hasText: !!(record.props as any).text, - textValue: (record.props as any).text, - textType: typeof (record.props as any).text - }) - } - if (record.type === 'ObsNote') { - hasTitle: !!(record.props as any).title, - hasContent: !!(record.props as any).content, - hasTags: Array.isArray((record.props as any).tags), - title: (record.props as any).title, - contentLength: (record.props as any).content?.length || 0, - tagsCount: Array.isArray((record.props as any).tags) ? (record.props as any).tags.length : 0 - }) - } - } - const sanitizedRecord = sanitizeRecord(record) // CRITICAL: Restore original coordinates if they were valid @@ -513,89 +475,11 @@ export function applyTLStoreChangesToAutomerge( } } - // DEBUG: Log richText, meta.text, and Obsidian note properties after sanitization - if (sanitizedRecord.typeName === 'shape') { - if (sanitizedRecord.type === 'geo' && (sanitizedRecord.props as any)?.richText) { - hasRichText: !!(sanitizedRecord.props as any).richText, - richTextType: typeof (sanitizedRecord.props as any).richText, - richTextContent: Array.isArray((sanitizedRecord.props as any).richText) ? 'array' : (sanitizedRecord.props as any).richText?.content ? 'object with content' : 'object without content' - }) - } - if (sanitizedRecord.type === 'geo' && (sanitizedRecord.meta as any)?.text !== undefined) { - hasMetaText: !!(sanitizedRecord.meta as any).text, - metaTextValue: (sanitizedRecord.meta as any).text, - metaTextType: typeof (sanitizedRecord.meta as any).text - }) - } - if (sanitizedRecord.type === 'note' && (sanitizedRecord.props as any)?.richText) { - hasRichText: !!(sanitizedRecord.props as any).richText, - richTextType: typeof (sanitizedRecord.props as any).richText, - richTextContent: Array.isArray((sanitizedRecord.props as any).richText) ? 'array' : (sanitizedRecord.props as any).richText?.content ? 'object with content' : 'object without content', - richTextContentLength: Array.isArray((sanitizedRecord.props as any).richText?.content) ? (sanitizedRecord.props as any).richText.content.length : 'not array' - }) - } - if (sanitizedRecord.type === 'arrow' && (sanitizedRecord.props as any)?.text !== undefined) { - hasText: !!(sanitizedRecord.props as any).text, - textValue: (sanitizedRecord.props as any).text, - textType: typeof (sanitizedRecord.props as any).text - }) - } - if (sanitizedRecord.type === 'ObsNote') { - hasTitle: !!(sanitizedRecord.props as any).title, - hasContent: !!(sanitizedRecord.props as any).content, - hasTags: Array.isArray((sanitizedRecord.props as any).tags), - title: (sanitizedRecord.props as any).title, - contentLength: (sanitizedRecord.props as any).content?.length || 0, - tagsCount: Array.isArray((sanitizedRecord.props as any).tags) ? (sanitizedRecord.props as any).tags.length : 0 - }) - } - } - // CRITICAL: Create a deep copy to ensure all properties (including richText and text) are preserved // This prevents Automerge from treating the object as read-only // Note: sanitizedRecord.props is already a deep copy from sanitizeRecord, but we need to deep copy the entire record const recordToSave = JSON.parse(JSON.stringify(sanitizedRecord)) - // DEBUG: Log richText, meta.text, and Obsidian note properties after deep copy - if (recordToSave.typeName === 'shape') { - if (recordToSave.type === 'geo' && recordToSave.props?.richText) { - hasRichText: !!recordToSave.props.richText, - richTextType: typeof recordToSave.props.richText, - richTextContent: Array.isArray(recordToSave.props.richText) ? 'array' : recordToSave.props.richText?.content ? 'object with content' : 'object without content', - richTextContentLength: Array.isArray(recordToSave.props.richText?.content) ? recordToSave.props.richText.content.length : 'not array' - }) - } - if (recordToSave.type === 'geo' && recordToSave.meta?.text !== undefined) { - hasMetaText: !!recordToSave.meta.text, - metaTextValue: recordToSave.meta.text, - metaTextType: typeof recordToSave.meta.text - }) - } - if (recordToSave.type === 'note' && recordToSave.props?.richText) { - hasRichText: !!recordToSave.props.richText, - richTextType: typeof recordToSave.props.richText, - richTextContent: Array.isArray(recordToSave.props.richText) ? 'array' : recordToSave.props.richText?.content ? 'object with content' : 'object without content', - richTextContentLength: Array.isArray(recordToSave.props.richText?.content) ? recordToSave.props.richText.content.length : 'not array' - }) - } - if (recordToSave.type === 'arrow' && recordToSave.props?.text !== undefined) { - hasText: !!recordToSave.props.text, - textValue: recordToSave.props.text, - textType: typeof recordToSave.props.text - }) - } - if (recordToSave.type === 'ObsNote') { - hasTitle: !!recordToSave.props.title, - hasContent: !!recordToSave.props.content, - hasTags: Array.isArray(recordToSave.props.tags), - title: recordToSave.props.title, - contentLength: recordToSave.props.content?.length || 0, - tagsCount: Array.isArray(recordToSave.props.tags) ? recordToSave.props.tags.length : 0, - allPropsKeys: Object.keys(recordToSave.props || {}) - }) - } - } - // Replace the entire record - Automerge will handle merging with concurrent changes doc.store[record.id] = recordToSave }) diff --git a/src/automerge/useAutomergeSyncRepo.ts b/src/automerge/useAutomergeSyncRepo.ts index 089140d..0c996a2 100644 --- a/src/automerge/useAutomergeSyncRepo.ts +++ b/src/automerge/useAutomergeSyncRepo.ts @@ -158,19 +158,6 @@ export function useAutomergeSync(config: AutomergeSyncConfig): TLStoreWithStatus const deletedRecordIds = data.deleted || [] const deletedShapes = deletedRecordIds.filter(id => id.startsWith('shape:')) - // Log incoming sync data for debugging - if (shapeRecords.length > 0) { - shapeRecords.forEach((shape: any) => { - x: shape.x, - y: shape.y, - w: shape.props?.w, - h: shape.props?.h - }) - }) - } - if (deletedShapes.length > 0) { - } - // Apply changes to the Automerge document // This will trigger patches which will update the TLDraw store // NOTE: We do NOT increment pendingLocalChanges here because these are REMOTE changes @@ -621,17 +608,6 @@ export function useAutomergeSync(config: AutomergeSyncConfig): TLStoreWithStatus return } - // Log significant changes for debugging - const shapePatches = payload.patches.filter((p: any) => { - const id = p.path?.[1] - return id && typeof id === 'string' && id.startsWith('shape:') - }) - - if (shapePatches.length > 0) { - patchCount: patchCount, - shapePatches: shapePatches.length - }) - } } handle.on('change', changeHandler) diff --git a/src/components/FathomMeetingsPanel.tsx b/src/components/FathomMeetingsPanel.tsx index a0f31cc..d33d674 100644 --- a/src/components/FathomMeetingsPanel.tsx +++ b/src/components/FathomMeetingsPanel.tsx @@ -149,12 +149,6 @@ export function FathomMeetingsPanel({ onClose, onMeetingSelect, shapeMode = fals // Handler for individual data type buttons - creates shapes directly const handleDataButtonClick = async (meeting: FathomMeeting, dataType: 'summary' | 'transcript' | 'actionItems' | 'video') => { - // Log to verify the correct meeting is being used - recording_id: meeting.recording_id, - title: meeting.title, - dataType - }) - if (!onMeetingSelect) { // Fallback for non-browser mode const options = { diff --git a/src/components/networking/NetworkGraphPanel.tsx b/src/components/networking/NetworkGraphPanel.tsx index 453e792..957d420 100644 --- a/src/components/networking/NetworkGraphPanel.tsx +++ b/src/components/networking/NetworkGraphPanel.tsx @@ -296,7 +296,7 @@ export function NetworkGraphPanel({ onExpand }: NetworkGraphPanelProps) { }, [disconnect]); // Handle node click - const handleNodeClick = useCallback((node: any) => { + const handleNodeClick = useCallback((_node: any) => { // Could open a profile modal or navigate to user }, []); diff --git a/src/lib/auth/sessionPersistence.ts b/src/lib/auth/sessionPersistence.ts index a111fe6..b0fcb00 100644 --- a/src/lib/auth/sessionPersistence.ts +++ b/src/lib/auth/sessionPersistence.ts @@ -59,10 +59,6 @@ export const loadSession = (): StoredSession | null => { } const parsed = JSON.parse(stored) as StoredSession; - username: parsed.username, - authed: parsed.authed, - timestamp: new Date(parsed.timestamp).toISOString() - }); // Check if session is not too old (7 days) const maxAge = 7 * 24 * 60 * 60 * 1000; // 7 days in milliseconds diff --git a/src/lib/githubSetupValidator.ts b/src/lib/githubSetupValidator.ts index adbc804..6443a74 100644 --- a/src/lib/githubSetupValidator.ts +++ b/src/lib/githubSetupValidator.ts @@ -102,20 +102,4 @@ export function logGitHubSetupStatus(): void { const status = validateGitHubSetup() - if (status.isValid) { - } else { - status.issues.forEach(issue => {}) - } - - if (status.warnings.length > 0) { - status.warnings.forEach(warning => {}) - } - - if (status.suggestions.length > 0) { - status.suggestions.forEach(suggestion => {}) - } - - if (!status.isValid) { - getGitHubSetupInstructions().forEach(instruction => {}) - } } diff --git a/src/lib/quartzSync.ts b/src/lib/quartzSync.ts index f7013c8..f779325 100644 --- a/src/lib/quartzSync.ts +++ b/src/lib/quartzSync.ts @@ -40,13 +40,7 @@ export class QuartzSync { try { const { githubToken, githubRepo } = this.config const [owner, repo] = githubRepo.split('/') - - owner, - repo, - noteTitle: note.title, - noteFilePath: note.filePath - }) - + // Get the current file content to check if it exists const filePath = `content/${note.filePath}` let sha: string | undefined @@ -225,13 +219,6 @@ ${note.content}` * Prioritizes GitHub integration for Quartz sites */ async smartSync(note: QuartzNote): Promise { - hasGitHubToken: !!this.config.githubToken, - hasGitHubRepo: !!this.config.githubRepo, - hasCloudflareApiKey: !!this.config.cloudflareApiKey, - hasCloudflareAccountId: !!this.config.cloudflareAccountId, - hasQuartzUrl: !!this.config.quartzUrl - }) - // Check if GitHub integration is available and preferred if (this.config.githubToken && this.config.githubRepo) { try { @@ -241,12 +228,7 @@ ${note.content}` } } catch (error) { console.warn('⚠️ GitHub sync failed, trying other methods:', error) - console.warn('⚠️ GitHub sync error details:', { - message: error instanceof Error ? error.message : 'Unknown error', - stack: error instanceof Error ? error.stack : 'No stack trace' - }) } - } else { } // Fallback to other methods diff --git a/src/lib/testClientConfig.ts b/src/lib/testClientConfig.ts index 7313e0f..05df77f 100644 --- a/src/lib/testClientConfig.ts +++ b/src/lib/testClientConfig.ts @@ -6,18 +6,10 @@ import { getClientConfig, isGitHubConfigured, getGitHubConfig } from './clientConfig' export function testClientConfig() { - const config = getClientConfig() - hasGithubToken: !!config.githubToken, - hasQuartzRepo: !!config.quartzRepo, - githubTokenLength: config.githubToken?.length || 0, - quartzRepo: config.quartzRepo - }) - const isConfigured = isGitHubConfigured() - const githubConfig = getGitHubConfig() - + return { config, isConfigured, diff --git a/src/open-mapping/hooks/useCollaboration.ts b/src/open-mapping/hooks/useCollaboration.ts index 6210d37..fd44a27 100644 --- a/src/open-mapping/hooks/useCollaboration.ts +++ b/src/open-mapping/hooks/useCollaboration.ts @@ -74,13 +74,13 @@ export function useCollaboration({ }; }, [sessionId, serverUrl]); - const createSession = useCallback(async (name: string): Promise => { + const createSession = useCallback(async (_name: string): Promise => { // TODO: Create new Y.js document and return session ID const newSessionId = `session-${Date.now()}`; return newSessionId; }, []); - const joinSession = useCallback(async (sessionIdToJoin: string): Promise => { + const joinSession = useCallback(async (_sessionIdToJoin: string): Promise => { // TODO: Join existing Y.js session }, []); @@ -96,15 +96,15 @@ export function useCollaboration({ // awareness.setLocalStateField('cursor', coordinate); }, []); - const broadcastRouteChange = useCallback((route: Route) => { + const broadcastRouteChange = useCallback((_route: Route) => { // TODO: Update Y.js shared route array }, []); - const broadcastWaypointChange = useCallback((waypoint: Waypoint) => { + const broadcastWaypointChange = useCallback((_waypoint: Waypoint) => { // TODO: Update Y.js shared waypoint array }, []); - const broadcastLayerChange = useCallback((layer: MapLayer) => { + const broadcastLayerChange = useCallback((_layer: MapLayer) => { // TODO: Update Y.js shared layer array }, []); diff --git a/src/routes/Board.tsx b/src/routes/Board.tsx index d7a298d..73a673c 100644 --- a/src/routes/Board.tsx +++ b/src/routes/Board.tsx @@ -376,25 +376,6 @@ export function Board() { ? false // Don't restrict while loading/transitioning - assume can edit : permission === 'view' // Only restrict if explicitly view (protected board) - // Debug logging for permission issues - permission, - permissionLoading, - sessionAuthed: session.authed, - sessionLoading: session.loading, - sessionUsername: session.username, - authJustChanged, - isReadOnly, - reason: session.loading - ? 'auth loading - allowing edit temporarily' - : authJustChanged - ? 'auth just changed - allowing edit until effects run' - : permissionLoading - ? 'permission loading - allowing edit temporarily' - : permission === 'view' - ? 'protected board - user not an editor (view-only)' - : 'open board or user is editor (can edit)' - }) - // Handler for when user tries to edit in read-only mode const handleEditAttempt = () => { if (isReadOnly) { @@ -681,29 +662,6 @@ export function Board() { // Debug: Log page information const allPages = store.store.allRecords().filter((r: any) => r.typeName === 'page') - // CRITICAL DEBUG: Check if shapes exist in editor but aren't returned by getCurrentPageShapes - if (storeShapesOnCurrentPage.length > 0 && editorShapes.length === 0) { - const sampleShape = storeShapesOnCurrentPage[0] - const shapeInEditor = editor.getShape(sampleShape.id as TLShapeId) - if (shapeInEditor) { - id: shapeInEditor.id, - type: shapeInEditor.type, - parentId: shapeInEditor.parentId, - pageId: editor.getCurrentPageId(), - matches: shapeInEditor.parentId === editor.getCurrentPageId() - }) - } - } - - // Debug: Log shape parent IDs to see if there's a mismatch - if (storeShapes.length > 0 && editorShapes.length === 0) { - const parentIdCounts = new Map() - storeShapes.forEach((s: any) => { - const pid = s.parentId || 'no-parent' - parentIdCounts.set(pid, (parentIdCounts.get(pid) || 0) + 1) - }) - } - // REMOVED: Aggressive force refresh that was causing coordinate loss // If shapes are in store but editor doesn't see them, it's likely a different issue // Forcing refresh by re-putting was resetting coordinates to 0,0 @@ -929,11 +887,6 @@ export function Board() { } catch (error) { console.error(`❌ Board: Error switching to page ${pageWithMostShapes}:`, error) } - } else if (pageWithMostShapes) { - pageId, - shapeCount: count, - isCurrent: pageId === currentPageId - }))) } } } @@ -1428,8 +1381,6 @@ export function Board() { const isAuthenticated = checkAuthFromStorage(); const initialReadOnly = !isAuthenticated; editor.updateInstanceState({ isReadonly: initialReadOnly }) - ? '🔒 Board is in read-only mode (not authenticated)' - : '🔓 Board is editable (authenticated)') // Also ensure the current tool is appropriate for the mode if (!initialReadOnly) { diff --git a/src/shapes/DrawfastShapeUtil.tsx b/src/shapes/DrawfastShapeUtil.tsx index 65b020d..b1aca94 100644 --- a/src/shapes/DrawfastShapeUtil.tsx +++ b/src/shapes/DrawfastShapeUtil.tsx @@ -35,8 +35,8 @@ export class DrawfastShape extends BaseBoxShapeUtil { getDefaultProps(): IDrawfastShape["props"] { return { - w: 512, - h: 512, + w: 900, + h: 500, prompt: "", generatedImageUrl: null, overlayMode: true, @@ -160,16 +160,6 @@ export class DrawfastShape extends BaseBoxShapeUtil { }) } - const handleToggleOverlay = () => { - editor.updateShape({ - id: shape.id, - type: 'Drawfast', - props: { - overlayMode: !shape.props.overlayMode, - }, - }) - } - const handleToggleAutoGenerate = () => { editor.updateShape({ id: shape.id, @@ -361,107 +351,151 @@ export class DrawfastShape extends BaseBoxShapeUtil { backgroundColor: '#1a1a2e', overflow: 'hidden', }}> - {/* Drawing Area / Result Display */} + {/* Main content area - INPUT and OUTPUT side by side */}
- {/* Generated Image (if available and overlay mode) */} - {shape.props.generatedImageUrl && shape.props.overlayMode && ( - AI Generated - )} - - {/* Instructions when empty */} - {!shape.props.generatedImageUrl && ( + {/* INPUT - Drawing Area (Left Side) */} +
+ {/* INPUT Label */}
-
✏️
-
Draw inside this frame
-
- Use the pencil, pen, or other tools to sketch -
+ 📝 Input (Draw Here)
- )} - {/* Loading indicator */} - {(shape.props.isGenerating || liveImageState.isGenerating) && ( + {/* Drawing canvas area */}
+ {/* Instructions when empty */}
- Generating... + position: 'absolute', + top: '50%', + left: '50%', + transform: 'translate(-50%, -50%)', + textAlign: 'center', + color: '#666', + fontSize: '14px', + padding: '20px', + pointerEvents: 'none', + zIndex: 5, + }}> +
✏️
+
Draw inside this frame
+
+ Use the pencil, pen, or other tools to sketch +
+
- )} -
- - {/* Side-by-side result (when not overlay mode) */} - {shape.props.generatedImageUrl && !shape.props.overlayMode && ( -
- AI Generated
- )} + + {/* OUTPUT - Generated Image (Right Side) */} +
+ {/* OUTPUT Label */} +
+ ✨ Output (AI Generated) +
+ + {/* Output content area */} +
+ {/* Generated Image */} + {shape.props.generatedImageUrl ? ( + AI Generated + ) : ( +
+
🖼️
+
Generated image will appear here
+
+ )} + + {/* Loading indicator */} + {(shape.props.isGenerating || liveImageState.isGenerating) && ( +
+
+ Generating... +
+ )} +
+
+
{/* Controls */}
{ /> Real-time - - {/* Overlay toggle */} -
diff --git a/src/shapes/FathomMeetingsBrowserShapeUtil.tsx b/src/shapes/FathomMeetingsBrowserShapeUtil.tsx index cc771c2..6235421 100644 --- a/src/shapes/FathomMeetingsBrowserShapeUtil.tsx +++ b/src/shapes/FathomMeetingsBrowserShapeUtil.tsx @@ -106,13 +106,6 @@ export class FathomMeetingsBrowserShape extends BaseBoxShapeUtil c.id)); - // Debug logging - if (collaboratorsWithLocation.length > 0) { - total: allCollaborators.length, - withLocation: collaboratorsWithLocation.length, - users: collaboratorsWithLocation.map(c => ({ id: c.id.slice(0, 8), name: c.name, loc: c.location })), - }); - } - // Remove old collaborator markers that are no longer sharing collaboratorMarkersRef.current.forEach((marker, id) => { if (!currentCollaboratorIds.has(id)) { diff --git a/src/tools/FathomMeetingsTool.ts b/src/tools/FathomMeetingsTool.ts index b55b655..82c9b62 100644 --- a/src/tools/FathomMeetingsTool.ts +++ b/src/tools/FathomMeetingsTool.ts @@ -231,12 +231,7 @@ export class FathomMeetingsIdle extends StateNode { // This ensures the shape appears exactly where the user clicked const finalX = baseX const finalY = baseY - clickPosition: { x: clickX, y: clickY }, - shapePosition: { x: finalX, y: finalY }, - shapeSize: { w: shapeWidth, h: shapeHeight } - }) - const browserShape = this.editor.createShape({ type: 'FathomMeetingsBrowser', x: finalX, diff --git a/src/tools/HolonTool.ts b/src/tools/HolonTool.ts index 59fe8fc..0902162 100644 --- a/src/tools/HolonTool.ts +++ b/src/tools/HolonTool.ts @@ -179,24 +179,9 @@ export class HolonIdle extends StateNode { // ALWAYS use click position directly when provided - user clicked where they want it // Skip collision detection entirely for user clicks to ensure it appears exactly where clicked - let finalX = baseX - let finalY = baseY - - if (clickX !== undefined && clickY !== undefined) { - // User clicked - ALWAYS use that exact position, no collision detection - // This ensures the shape appears exactly where the user clicked - finalX = baseX - finalY = baseY - clickPosition: { x: clickX, y: clickY }, - shapePosition: { x: finalX, y: finalY }, - shapeSize: { w: shapeWidth, h: shapeHeight } - }) - } else { - // For fallback (no click), use base position directly - finalX = baseX - finalY = baseY - } - + const finalX = baseX + const finalY = baseY + // Default coordinates (can be changed by user) const defaultLat = 40.7128 // NYC const defaultLng = -74.0060 diff --git a/src/ui/overrides.tsx b/src/ui/overrides.tsx index ea53182..c3d91fc 100644 --- a/src/ui/overrides.tsx +++ b/src/ui/overrides.tsx @@ -480,7 +480,7 @@ export const overrides: TLUiOverrides = { onSelect: async () => { try { // Create a simple modal/prompt for AI response - const answer = await askCanvasAI(editor, undefined, (partial, done) => { + const answer = await askCanvasAI(editor, undefined, (_partial, done) => { // Log streaming response to console for now if (!done) { } @@ -500,7 +500,7 @@ export const overrides: TLUiOverrides = { readonlyOk: true, onSelect: async () => { try { - await indexCanvasForSearch(editor, (progress) => { + await indexCanvasForSearch(editor, (_progress) => { }) } catch (error) { console.error("Canvas indexing error:", error) @@ -514,7 +514,7 @@ export const overrides: TLUiOverrides = { readonlyOk: true, onSelect: async () => { try { - await explainViewport(editor, (partial, done) => { + await explainViewport(editor, (_partial, done) => { if (!done) { } })