Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 43 additions & 23 deletions apps/web/app/routes/board-route/current-user-standup-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,21 @@ function CardContentUI({
};
}

useEffect(() => {
if (createStandupFetcher.state !== "idle" && createStandupFetcher.data) {
const { error } = createStandupFetcher.data;
if (error) {
toast.error(error);
console.error(error);
setIsEditing(true);
} else {
toast.success("Your standup has been saved");
useEffect(
function handleCreateStandupResponse() {
if (createStandupFetcher.state !== "idle" && createStandupFetcher.data) {
const { error } = createStandupFetcher.data;
if (error) {
toast.error(error);
console.error(error);
setIsEditing(true);
} else {
toast.success("Your standup has been saved");
}
}
}
}, [createStandupFetcher.state, createStandupFetcher.data]);
},
[createStandupFetcher.state, createStandupFetcher.data]
);
Comment on lines +208 to +222

Choose a reason for hiding this comment

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

medium

The logic inside this useEffect for handling the fetcher response is duplicated for handleUpdateStandupResponse (lines 245-259). This duplication can make the code harder to maintain.

Consider extracting this logic into a custom hook to handle both createStandupFetcher and updateStandupFetcher. This will centralize the response handling logic, making it more reusable and easier to manage.

Here's an example of what the custom hook could look like:

import { useEffect } from 'react';
import { useToast } from '~/hooks/use-toast';
import type { useFetcher } from 'react-router-dom';

// It's a good practice to define a shared type for the action data
type FetcherData = {
  error?: string | null;
  // other properties...
};

function useSubmitStandupResponseHandler(
  fetcher: ReturnType<typeof useFetcher<FetcherData>>,
  setIsEditing: (isEditing: boolean) => void
) {
  const { toast } = useToast();

  useEffect(() => {
    if (fetcher.state === 'idle' || !fetcher.data) {
      return;
    }

    const { error } = fetcher.data;
    if (error) {
      toast.error(error);
      console.error(error);
      setIsEditing(true);
    } else {
      toast.success('Your standup has been saved');
    }
  }, [fetcher.state, fetcher.data, setIsEditing, toast]);
}

You could then use it in your component like this:

useSubmitStandupResponseHandler(createStandupFetcher, setIsEditing);
useSubmitStandupResponseHandler(updateStandupFetcher, setIsEditing);


if (updateStandupFetcher.data) {
const standup = updateStandupFetcher.data?.standup;
Expand All @@ -239,21 +242,33 @@ function CardContentUI({
}
}

useEffect(() => {
if (updateStandupFetcher.state !== "idle" && updateStandupFetcher.data) {
const error = updateStandupFetcher.data.error;
if (error) {
toast.error(error);
console.error(error);
setIsEditing(true);
} else {
toast.success("Your standup has been saved");
useEffect(
function handleUpdateStandupResponse() {
if (updateStandupFetcher.state !== "idle" && updateStandupFetcher.data) {
const error = updateStandupFetcher.data.error;
if (error) {
toast.error(error);
console.error(error);
setIsEditing(true);
} else {
toast.success("Your standup has been saved");
}
}
}
}, [updateStandupFetcher.state, updateStandupFetcher.data]);
},
[updateStandupFetcher.state, updateStandupFetcher.data]
);

const [isEditing, setIsEditing] = useState(!Boolean(currentUserTodayStandup));

useEffect(
function switchToEditingModeWhenNoStandup() {
if (!currentUserTodayStandup) {
setIsEditing(true);
}
},
[currentUserTodayStandup]
);

function handleDynamicFormCancel() {
setIsEditing(false);
}
Expand Down Expand Up @@ -344,9 +359,14 @@ function CardContentUI({
<Flex direction="column" gap="5">
<Flex direction="column" gap="5">
{schema.fields.map((field) => {
if (!currentUserTodayStandup) {
return null;
}

const value = (
currentUserTodayStandup?.formData as DynamicFormValues
currentUserTodayStandup.formData as DynamicFormValues
)[field.name];

if (!value) {
return null;
}
Expand Down
4 changes: 1 addition & 3 deletions apps/web/app/routes/board-route/feed-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ function FeedViewUI({
</Callout.Root>
)} */}

{isToday && currentUser && (
<CurrentUserStandupCard key="current-user-standup-card" />
)}
{isToday && currentUser && <CurrentUserStandupCard />}

{/* Show all other standups in single column */}
{groupStandups.map((standup) => {
Expand Down
4 changes: 1 addition & 3 deletions apps/web/app/routes/board-route/grid-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,7 @@ function GridViewUI({
</>
)} */}

{isToday && currentUser && (
<CurrentUserStandupCard key="current-user-standup-card" />
)}
{isToday && currentUser && <CurrentUserStandupCard />}

{groupStandups.map((standup) => {
const user = usersMap.get(standup.userId);
Expand Down
16 changes: 16 additions & 0 deletions docs/releases/v0.1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# v0.1.0

This is the first alpha release of Standup Kiwi—a basic prototype serving as a proof of concept. It is not yet ready for practical use and is definitely full of bugs. Expect improvements in future updates as we refine functionality and stability!

## Features

- Board Creation – Create boards to organize your standups.
- Board Selection – Easily switch between boards using a dropdown menu.
- Dark Theme Support – Enjoy a sleek dark mode for a comfortable viewing experience.
- Board Management
- View a list of available boards.
- Open and view board details.
- Standup Management
- Add a standup entry for today.
- View a list of past standups for a board.
- Secure Signup with Email OTP – Sign up effortlessly using a one-time password (OTP) sent to your email.
19 changes: 19 additions & 0 deletions docs/releases/v0.2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# v0.2.0

This update focuses on backend robustness, groundwork for future features, and improvements to overall code quality.

## Improvements

- **Stricter TypeScript Configuration**
TypeScript settings have been tightened for better type safety. All existing type errors have been resolved.

- **Database Reconnection Logic**
Added automatic database reconnection logic to handle connection drops more gracefully.

- **Database Schema Update**
Refactored table and column names for improved consistency and readability.

## In Progress

- **Board Settings Page (Prototype)**
Initial UI structure implemented as a foundation for future settings functionality. Not yet connected to backend or state logic.
29 changes: 29 additions & 0 deletions docs/releases/v0.3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# v0.3.0

This release introduces user-facing improvements, visual refinements, and infrastructure enhancements to support smoother development workflows.

## Features

- **Markdown Support in Standups**
Standup forms and cards now support basic markdown formatting for clearer, more expressive updates.

- **Enhanced Authentication Flow**
Improved logic and structure for handling authentication across the app.

## Bugfixes

- **Dark Mode Logo Visibility**
Fixed an issue where the Kiwi logo was hard to see in dark mode by ensuring it appears in white.

## Improvements

- **Appearance State Highlighting**
UI elements now reflect their active state more clearly for improved usability.

- **Root Redirect Handling**
Fixed routing behavior from the root path for a more seamless experience.

## Infrastructure

- **CI Setup for Monorepo**
GitHub Actions now validate builds and run type checks automatically to improve reliability during development.
13 changes: 13 additions & 0 deletions docs/releases/v0.3.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# v0.3.1

This release includes deployment configuration updates and a small bug fix to improve the user experience.

## Improvements

- Renamed and updated package.json scripts for consistency across web and API apps

## Bugfixes

- Fixed an issue where error messages were not properly displayed on the access and sign-in forms

**Full Changelog**: https://github.com/kiwinight/standup-kiwi/compare/v0.3.0...v0.3.1
28 changes: 28 additions & 0 deletions docs/releases/v0.4.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# v0.4.0

This release introduces metadata enhancements, user-facing settings features, and deployment improvements to support a more polished user experience.

## Features

- **Board Name Editing in Settings**
Users can now edit the board name directly from the Settings page, making customization easier.

## Improvements

- **Website Metadata Configuration**
Added title, description, and Open Graph tags to improve SEO and social sharing.

- **Mobile Viewport Handling**
Prevented zoom-in behavior on mobile when focusing on input fields for a smoother experience.

## Bugfixes

- **Deployment Fixes**
Resolved issues related to app deployment to ensure stable release delivery.

## Infrastructure

- **Release Branch Deployment**
The release branch is now deployed to the release subdomain, separating staging from production environments.

**Full Changelog**: https://github.com/kiwinight/standup-kiwi/compare/v0.3.1...v0.4.0
43 changes: 43 additions & 0 deletions docs/releases/v0.5.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# v0.5.0

This release introduces improved board settings, refined UI behavior, and foundational updates for better user experience and system reliability.

## Features

- **Keyboard Shortcuts for Standup Forms**
Users can now navigate and submit standup forms more efficiently with new keyboard shortcut support.

- **Website and Blog Setup**
A public-facing website/blog has been set up as the new communication hub for updates and documentation.

## Improvements

- **Timezone Configuration**
Settings now include timezone selection, and the backend has been updated to reflect and persist these values accurately.

- **Optimistic UI Refactor**
Board interactions are now more responsive and stable thanks to an internal refactor of the optimistic UI behavior.

- **UI Polish**
Logo spacing and alignment have been improved. The board list in the toolbar now updates immediately after new board creation. Additionally, a hover state was added for board items in the navbar.

- **Empty History Messaging**
Users will now see a friendly message when no history is available, instead of a blank section.

## Bugfixes

- **Dark Mode Refresh Issue**
Fixed an issue where dark mode would reset after a page refresh.

- **Unauthorized Board Access**
Users attempting to access a board they don’t have permission to view will now see a 404 error.

- **Error Boundary Navigation**
Introduced a "Back to Main" button on error boundaries to guide users safely back to the app.

## Infrastructure

- **Runtime Update**
Upgraded Node.js runtime for performance and security improvements.

**Full Changelog**: https://github.com/kiwinight/standup-kiwi/compare/v0.4.0...v0.5.0
30 changes: 30 additions & 0 deletions docs/releases/v0.6.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# v0.6.0

This release includes metadata updates, analytics enhancements, and configuration improvements for smoother delivery and clearer communication.

## Improvements

- **Website Copy Update**
Refined website messaging for clearer communication and tone.

- **Analytics Integration**
Analytics have been added both within the application and on the public-facing website to better understand user behavior.

- **Metadata Enhancements**
Updated meta properties and values to improve SEO and social sharing.

- **README.md Initialization**
Added a README file to improve onboarding and developer experience.

- **Environment Variable for Button Behavior**
Added support for an environment variable to configure the 'Start Now' button logic.

- **Library Version Upgrades**
Bumped several dependencies to ensure compatibility and stability.

## Bugfixes

- **Optimistic UI Reliability**
Fixed an issue where the optimistic UI behavior did not function correctly during some standup interactions.

**Full Changelog**: https://github.com/kiwinight/standup-kiwi/compare/v0.5.0...v0.6.0
38 changes: 38 additions & 0 deletions docs/releases/v0.7.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# v0.7.0

This release includes new UI features, authentication improvements, and several Safari-related bug fixes.

## Features

- **Blog Setup**
Added a blog to the website for updates and announcements.

- **Toast Notifications**
Added toast notifications to give users feedback when they perform actions.

## Improvements

- **Auto-Resizing Text Fields**
Text areas now grow taller automatically as you type more content.

- **Auto-Refresh on Tab Focus**
The app refreshes itself when you switch back to the tab to keep data current.

- **Search Engine Prevention**
Prevented the app subdomain from showing up in search results.

- **Session Settings**
Updated authentication session configuration for better reliability.

- **Database Updates**
Cleaned up some database structure for better consistency.

## Bugfixes

- **Safari Login Fix**
Fixed login issues that were happening on Mac Safari with localhost.

- **Safari Display Fix**
Fixed UI display problems that made things look weird on Safari.

**Full Changelog**: https://github.com/kiwinight/standup-kiwi/compare/v0.6.0...v0.7.0
47 changes: 47 additions & 0 deletions docs/releases/v0.8.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# v0.8.0

This release introduces shared boards with collaborators. You can now turn any board into a shared space: invite teammates, assign roles, and manage membership — all in-app.

## Features

- **Shared Boards and Collaborators**
Invite collaborators, assign roles (including a new member role), update/remove collaborators, and leave a board.

- **Board Invitations**
Create and regenerate invitation links; accept invitations via dedicated routes.

- **Richer Standup Views**
New grid and feed views with support for multiple standups per day and a focused “today’s standup” for the current user.

- **New Landing Page**
A refreshed website with an interactive demo and animations.

## Improvements

- **Personal Board Layout Alignment**
The personal board experience is now aligned with the team board layout.

- **Clearer Empty States**
Improved empty-history UI for past standups.

- **Authentication Structure**
Introduced a permissive auth guard/service and refined session/token handling.

- **Shared Types Across API & Web**
Consolidated TypeScript types to improve consistency and developer experience.

- **Auth Path Rename**
Cleaned up routing and renamed email auth paths to `/auth/email/...`.

- **Database Updates**
Schema and migrations to support collaborator roles and invitation workflow.

## Bugfixes

- **Safari Reliability**
Fixed Safari-specific runtime and login issues.

- **Route Loader Stability**
Resolved a crash caused by a non-null assertion during route loader data destructuring.

**Full Changelog**: https://github.com/kiwinight/standup-kiwi/compare/v0.7.0...v0.8.0
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"private": false,
"scripts": {
"dev:web": "pnpm --filter standup-kiwi-web dev",
"dev:api": "pnpm --filter standup-kiwi-api dev",
"dev:website": "pnpm --filter standup-kiwi-website dev"
"dev:api": "pnpm --filter standup-kiwi-api dev"
}
}
Loading