Skip to content

chore: visual rework#112

Merged
hmbanan666 merged 1 commit into
mainfrom
chore
Aug 29, 2025
Merged

chore: visual rework#112
hmbanan666 merged 1 commit into
mainfrom
chore

Conversation

@hmbanan666
Copy link
Copy Markdown
Collaborator

@hmbanan666 hmbanan666 commented Aug 29, 2025

Summary by CodeRabbit

  • Improvements
    • Epic cards: streamlined layout; timestamp moved to the right for clearer readability.
    • Press feedback feels smoother with a subtler active-state scale effect.
    • Comment notification form now uses single-recipient selection with updated labels and avatar preview; sending flow remains the same.

@hmbanan666 hmbanan666 self-assigned this Aug 29, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 29, 2025

Walkthrough

UI adjustments in ActiveCard and EpicCard modify active scaling, wrapper structure, and timestamp layout. CreateEpicCommentBeacon switches recipient selection from multi-select to single-select, updating state, bindings, labels, and watcher logic while keeping submission behavior intact.

Changes

Cohort / File(s) Summary of changes
Card UI tweaks
apps/atrium-telegram/app/components/ActiveCard.vue, apps/atrium-telegram/app/components/EpicCard.vue
ActiveCard: active scale from active:scale-90 to active:scale-95. EpicCard: removed outer wrapper, reorganized top row to place time as right-aligned sibling; content hierarchy adjusted without changing data bindings/formatting.
Form single-select conversion
apps/atrium-telegram/app/components/form/CreateEpicCommentBeacon.vue
Switched recipients from multi- to single-select: state selectedMembers[]selectedMember, labels updated, avatar binding adjusted, watcher maps single ID into array for API, submission flow unchanged.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Form as CreateEpicCommentBeacon
  participant API as Backend API

  User->>Form: Open form
  User->>Form: Select single recipient (selectedMember)
  Note right of Form: state.usersId = [selectedMember.value]

  User->>Form: Submit
  Form->>API: POST /epic-comment/beacon { usersId: [id], ... }
  API-->>Form: 200 OK / Error
  alt Success
    Form-->>User: Confirmation & UI update
  else Error
    Form-->>User: Error message
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • chore: update #107 — Also modifies EpicCard.vue structure and timestamp placement, overlapping with this PR’s DOM reorganization.

Poem

A twitch of whiskers, tap of paw—
Cards reshaped with gentle awe.
Time slides right, the scale feels neat,
One friend pinged with tidy beat.
I thump approval, light and quick—
Ship it fast—rabbit-chic! 🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (5)
apps/atrium-telegram/app/components/EpicCard.vue (2)

3-11: Verify spacing after wrapper removal

Dropping the outer flex/column wrapper can collapse vertical rhythm between icon, title, and description. If spacing regressed, add a container with gap (e.g., flex-col gap-3.5) or use space-y utilities.


21-25: Reduce SSR hydration risk from timezone differences

Formatting with new Date(...) can render different days server vs client near midnight in differing timezones. Parse ISO and (optionally) pin timezone.

-        v-text="format(new Date(epic.createdAt), 'от d MMMM yyyy', { locale: ru })"
+        v-text="format(parseISO(epic.createdAt), 'от d MMMM yyyy', { locale: ru })"

Add import (outside this hunk):

import { format, parseISO } from 'date-fns'

If you see hydration warnings, consider date-fns-tz’s formatInTimeZone to a fixed TZ (e.g., UTC).

apps/atrium-telegram/app/components/form/CreateEpicCommentBeacon.vue (3)

11-11: Localize static text

Use i18n like surrounding strings for consistency.

-        Отметьте, кому хотите отправить уведомление
+        {{ $t('beacon.selectRecipientHint') }}

84-85: Prefer explicit null initial state

Clearer intent and simpler checks in templates.

-const selectedMember = ref<FormMember>()
+const selectedMember = ref<FormMember | null>(null)

58-83: Avatar alt text

Empty alt is fine for decorative avatars; if used as identification, consider alt with member name.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between bf4587a and 2250807.

📒 Files selected for processing (3)
  • apps/atrium-telegram/app/components/ActiveCard.vue (1 hunks)
  • apps/atrium-telegram/app/components/EpicCard.vue (1 hunks)
  • apps/atrium-telegram/app/components/form/CreateEpicCommentBeacon.vue (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (4)
apps/atrium-telegram/app/components/form/CreateEpicCommentBeacon.vue (4)

41-41: Good disabled logic tied to usersId length

Submit gating aligns with schema and watch updates once the above fix is applied.


100-116: Network flow looks fine; consider user-facing error feedback later

Console logging + haptics is acceptable for now in a chore PR.


1-45: No leftover selectedMembers references in CreateEpicCommentBeacon.vue The only name="members" attribute remains to map into the state.usersId array as designed.


20-30: Replace clearable suggestion with watcher reset
USelectMenu doesn’t support a clearable prop or @clear event—update the existing watcher to clear usersId when selectedMember is falsy:

watch(selectedMember, val => {
  state.value.usersId = val ? [val.value] : []
})

Likely an incorrect or invalid review comment.

@@ -1,5 +1,5 @@
<template>
<div class="relative active:scale-90 duration-200" @click="vibrate()">
<div class="relative active:scale-95 duration-200" @click="vibrate()">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Add keyboard a11y + proper transition + reduced-motion safeguards

Make the card operable via keyboard, and ensure the scale animation actually transitions (Tailwind needs a transition class). Also respect prefers-reduced-motion.

Apply:

-  <div class="relative active:scale-95 duration-200" @click="vibrate()">
+  <div
+    class="relative active:scale-95 transition-transform duration-200 motion-reduce:transition-none motion-reduce:transform-none cursor-pointer"
+    role="button" tabindex="0"
+    @click="vibrate()"
+    @keydown.enter="vibrate()" @keydown.space.prevent="vibrate()"
+  >

🏁 Script executed:

#!/bin/bash
# Verify existence of ActiveCard.vue and extract the relevant snippet
echo "Checking for ActiveCard.vue..."
if [ -f apps/atrium-telegram/app/components/ActiveCard.vue ]; then
  echo "✅ Found ActiveCard.vue"
else
  echo "❌ ActiveCard.vue not found"
  exit 1
fi

echo
echo "Extracting lines around the clickable <div>..."
grep -n -C2 "active:scale-95" apps/atrium-telegram/app/components/ActiveCard.vue

Length of output: 502


🏁 Script executed:

#!/bin/bash
# Show the start of the component to inspect script section
sed -n '1,200p' apps/atrium-telegram/app/components/ActiveCard.vue

echo
# Find where vibrate is defined or imported
grep -n "vibrate" apps/atrium-telegram/app/components/ActiveCard.vue

Length of output: 474


Add keyboard accessibility, proper transition, and reduced-motion support to ActiveCard.vue
The clickable <div> needs a transition class for transforms, a visible focus target, cursor-pointer, and prefers-reduced-motion safeguards. Apply:

-  <div class="relative active:scale-95 duration-200" @click="vibrate()">
+  <div
+    class="relative active:scale-95 transition-transform duration-200 motion-reduce:transition-none motion-reduce:transform-none cursor-pointer"
+    role="button" tabindex="0"
+    @click="vibrate()"
+    @keydown.enter="vibrate()" @keydown.space.prevent="vibrate()"
+  >
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div class="relative active:scale-95 duration-200" @click="vibrate()">
<div
class="relative active:scale-95 transition-transform duration-200 motion-reduce:transition-none motion-reduce:transform-none cursor-pointer"
role="button" tabindex="0"
@click="vibrate()"
@keydown.enter="vibrate()" @keydown.space.prevent="vibrate()"
>
🤖 Prompt for AI Agents
In apps/atrium-telegram/app/components/ActiveCard.vue around line 2, the
clickable <div> currently only has an active scale and click handler but lacks
keyboard accessibility, a proper transform transition, visible focus styling,
cursor affordance, and reduced-motion support; update the element to be
keyboard-focusable (add tabindex="0"), expose button semantics (role="button"),
handle Enter/Space keydown to invoke vibrate(), add a transition class that
targets transforms (e.g., transition-transform) and ensure cursor-pointer is
present, add a focus-visible style (ring or outline) so keyboard users see
focus, and respect prefers-reduced-motion by disabling or greatly reducing the
transform/transition when the user requests reduced motion (via a CSS class or
utility such as motion-reduce to remove the transform/transition).

Comment on lines +16 to 18
<UIcon name="i-lucide-message-circle" class="size-5" />
<p>{{ epic?.comments.length }}</p>
</div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Guard undefined comments; show 0 instead of blank

Prevents empty render when comments is missing.

-          <p>{{ epic?.comments.length }}</p>
+          <p>{{ epic?.comments?.length ?? 0 }}</p>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<UIcon name="i-lucide-message-circle" class="size-5" />
<p>{{ epic?.comments.length }}</p>
</div>
<UIcon name="i-lucide-message-circle" class="size-5" />
<p>{{ epic?.comments?.length ?? 0 }}</p>
</div>
🤖 Prompt for AI Agents
In apps/atrium-telegram/app/components/EpicCard.vue around lines 16 to 18, the
template directly renders epic?.comments.length which can be undefined and
results in a blank UI; update the binding to safely handle missing comments and
display 0 instead (for example, use a nullish/coalescing or conditional fallback
like epic?.comments?.length ?? 0 or compute a commentsCount that returns 0 when
epic or epic.comments is falsy) so the UI always shows a numeric value.

Comment on lines 15 to 19
<UFormField
label="Получатели"
label="Получатель"
name="members"
required
>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Bind field name to schema key for proper error mapping

Schema validates usersId; UFormField name should match to surface errors under this field. Also localize label.

-    <UFormField
-      label="Получатель"
-      name="members"
+    <UFormField
+      :label="$t('beacon.recipient')"
+      name="usersId"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<UFormField
label="Получатели"
label="Получатель"
name="members"
required
>
<UFormField
:label="$t('beacon.recipient')"
name="usersId"
required
>
🤖 Prompt for AI Agents
In apps/atrium-telegram/app/components/form/CreateEpicCommentBeacon.vue around
lines 15 to 19, the UFormField uses name="members" but the validation schema
expects usersId so errors won't map correctly; change the name prop to "usersId"
to match the schema and update the label to a localized string (use the existing
i18n key or wrap the label with $t('...')) so the field label is localized.

Comment on lines +86 to 92
watch(selectedMember, () => {
if (!selectedMember.value) {
return
}

state.value.usersId = selectedMembers.value?.map((member) => member?.value)
state.value.usersId = [selectedMember.value.value]
})
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix stale recipient on deselect; update immediately

Currently, clearing selection leaves previous usersId intact. Also initialize usersId from any pre-set selection.

-watch(selectedMember, () => {
-  if (!selectedMember.value) {
-    return
-  }
-
-  state.value.usersId = [selectedMember.value.value]
-})
+watch(selectedMember, (m) => {
+  state.value.usersId = m ? [m.value] : []
+}, { immediate: true })
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
watch(selectedMember, () => {
if (!selectedMember.value) {
return
}
state.value.usersId = selectedMembers.value?.map((member) => member?.value)
state.value.usersId = [selectedMember.value.value]
})
watch(selectedMember, (m) => {
state.value.usersId = m ? [m.value] : []
}, { immediate: true })
🤖 Prompt for AI Agents
In apps/atrium-telegram/app/components/form/CreateEpicCommentBeacon.vue around
lines 86-92, the watcher for selectedMember must both clear usersId when
selection is removed and initialize usersId from any pre-set selection; update
the watcher so it sets state.value.usersId = selectedMember.value ?
[selectedMember.value.value] : [] and add the watcher option { immediate: true }
so the handler runs on setup to populate usersId from an existing selection.

@hmbanan666 hmbanan666 merged commit 7aebc75 into main Aug 29, 2025
8 checks passed
@hmbanan666 hmbanan666 deleted the chore branch August 29, 2025 13:15
This was referenced Sep 15, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Oct 8, 2025
This was referenced Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant