diff --git a/GEMINI.md b/GEMINI.md index 1d000fd..3e2e361 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -1,7 +1,7 @@ # Project Guidelines & Automated Checks ## Formatting and Linting -When asked to fix or check formatting/linting issues, or before committing code changes, always run the automated fix commands directly instead of manually inspecting and fixing errors one by one: +When asked to fix or check formatting/linting issues, or right before the final commit prior to pushing, run the automated fix commands directly instead of manually inspecting and fixing errors one by one: ```bash npm run format && composer lint && npm run lint @@ -15,7 +15,7 @@ When asked to push: ``` 2. Switch to that branch. 3. Use atomic commits where applicable. -4. Run formatting and linting checks before committing: +4. Run formatting and linting checks only before the last commit: ```bash npm run format && composer lint && npm run lint ``` diff --git a/resources/js/components/navigation/Navigation.tsx b/resources/js/components/navigation/Navigation.tsx index ddcff9b..f47cac4 100644 --- a/resources/js/components/navigation/Navigation.tsx +++ b/resources/js/components/navigation/Navigation.tsx @@ -23,6 +23,7 @@ import { defineComponent, nextTick, onBeforeUnmount, + onMounted, ref, toRef, watch, @@ -860,49 +861,104 @@ export const SiteBottomNav = defineComponent({ const resolvedHref = (item: { href: string }) => item.href === '/' ? homeHref.value : item.href; - return () => ( - + ); + }; }, }); diff --git a/resources/js/pages/Chat/Index.vue b/resources/js/pages/Chat/Index.vue index 07b4561..e153d4a 100644 --- a/resources/js/pages/Chat/Index.vue +++ b/resources/js/pages/Chat/Index.vue @@ -476,6 +476,20 @@ const scrollToBottom = (smooth = true) => { }); }; +const handleInputFocus = () => { + scrollToBottom(true); + + if (typeof window !== 'undefined' && window.visualViewport) { + setTimeout(() => { + messageInputRef.value?.scrollIntoView({ + behavior: 'smooth', + block: 'nearest', + }); + scrollToBottom(true); + }, 150); + } +}; + let lastFetchTimestamp = 0; const fetchLatestMessages = async (force = false) => { const now = Date.now(); @@ -2130,6 +2144,7 @@ onUnmounted(() => { " :maxlength="maxLengthLimit" @input="handleInput" + @focus="handleInputFocus" @click="checkMentionTrigger" @keyup="checkMentionTrigger" @keydown="handleInputKeydown" diff --git a/resources/views/app.blade.php b/resources/views/app.blade.php index a2bebaf..cd0f9d5 100644 --- a/resources/views/app.blade.php +++ b/resources/views/app.blade.php @@ -18,7 +18,7 @@ } catch (_) {} })(); - + {{-- Browser chrome: top status bar + bottom nav bar (Chrome / Edge / Samsung Internet) --}}