Skip to content

[Feature] stackflow pop fallback 작업#137

Merged
seseoju merged 3 commits intodevelopfrom
feature/135
Feb 26, 2026
Merged

[Feature] stackflow pop fallback 작업#137
seseoju merged 3 commits intodevelopfrom
feature/135

Conversation

@seseoju
Copy link
Member

@seseoju seseoju commented Feb 26, 2026

🛠️ 변경 사항

실제로 어떤 작업을 했는지 구체적으로 작성해주세요.

  • UI 수정 (Design)
  • 기능 추가 (Feature)
  • 버그 수정 (Bug)
  • 리팩토링 (Refactor)
  • 성능 개선 (Performance)
  • 테스트 추가 (Chore)
  • 기타:

세부 변경 내용

  • 이전 스택이 없는 경우 stackflow pop이 동작하지 않는 문제를 해결했습니다.
  • 이전 스택이 없는 경우 fallback 액티비티로 push하도록 pop 기능을 확장한 shared/lib/stackflow/useStack.ts 훅을 추가했습니다.
  • 상세 일정 공유 후 앱 진입시 뒤로가기가 동작하지 않는 문제를 해결했습니다.

🔍 관련 이슈

관련 이슈를 링크해주세요. ex) close #23, related #23


📸 스크린샷 / GIF (선택)

UI 변경이 있다면 첨부해주세요.

Before After

⚠️ 주의 사항 / 리뷰 포인트

리뷰어가 특히 봐줬으면 하는 부분이나 고민했던 지점을 작성해주세요.


🔄 연관 작업

후속 작업이나 연관된 PR이 있다면 링크해주세요.

@seseoju seseoju requested a review from yummjin February 26, 2026 03:53
@seseoju seseoju self-assigned this Feb 26, 2026
@seseoju seseoju added the ✨ Feature 신규 기능을 추가합니다. label Feb 26, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @seseoju, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 Pull Request는 스택에 이전 액티비티가 없는 상태에서 stackflowpop 기능이 예상대로 동작하지 않던 문제를 해결합니다. 새로운 useStack 훅을 도입하여, 스택의 최상단 액티비티만 남아있을 때 pop 호출 시 지정된 대체 액티비티로 이동하도록 기능을 확장했습니다. 이를 통해 상세 일정 공유와 같이 특정 진입점에서 발생하는 뒤로가기 동작 문제를 해결하여 사용자 경험을 개선했습니다.

Highlights

  • 스택flow pop 동작 개선: 이전 스택이 없을 때 stackflow pop이 작동하지 않던 문제를 해결했습니다.
  • 새로운 useStack 훅 추가: 이전 스택이 없는 경우 대체(fallback) 액티비티로 푸시하도록 pop 기능을 확장한 shared/lib/stackflow/useStack.ts 훅을 추가했습니다.
  • 뒤로가기 기능 수정: 상세 일정 공유 후 앱 진입 시 뒤로가기가 동작하지 않던 문제를 수정했습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • apps/web/src/app/routes/stackflow.tsx
    • stackflow 인스턴스에서 actions를 내보내도록 수정되었습니다.
  • apps/web/src/pages/schedule/ui/ScheduleDetailPage.tsx
    • useFlow에서 pop을 직접 사용하는 대신, 새로 추가된 useStack 훅에서 pop을 가져와 사용하도록 변경되었습니다.
    • handleBack 함수에서 pop('SchedulePage')를 호출하여 대체 페이지를 지정했습니다.
  • apps/web/src/shared/lib/stackflow/useStack.ts
    • 스택의 크기가 1이고 대체 액티비티가 제공된 경우, 원래 pop 대신 대체 액티비티를 푸시하는 커스텀 pop 함수를 제공하는 useStack 훅이 추가되었습니다.
Activity
  • 아직 인간 활동이 없습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

✅ 잘한 점

  • 스택에 이전 화면이 없을 경우 pop이 동작하지 않는 문제를 해결하기 위해, fallback UI로 이동하는 useStack 훅을 추가하여 문제를 해결한 점이 좋습니다.
  • stackflowactionsstackflow.tsx에서 export하여 useStack 훅에서 사용하도록 수정한 것은 적절한 변경입니다.

❌ 위반 사항

  • 해당 PR에서는 스타일 가이드 위반 사항을 찾지 못했습니다.

🔧 개선 제안

  • ScheduleDetailPage.tsx에 디버깅 목적으로 추가된 것으로 보이는 console.log 구문이 남아있습니다. 머지 전 삭제가 필요합니다.
  • 새로 추가된 useStack 훅의 pop 함수가 호출 시점이 아닌, 훅 초기화 시점의 스택 정보를 사용하고 있어 잠재적인 버그를 유발할 수 있습니다. pop 함수가 호출될 때마다 스택 정보를 새로 가져오도록 수정하여 안정성을 높이는 것을 제안합니다.

Comment on lines 4 to 19
export const useStack = () => {
const stack = actions.getStack();
const stackSize = stack.activities.length;
const { push, pop: originalPop } = useFlow();

const pop = (fallback?: ActivityName) => {
if (stackSize === 1 && fallback) {
push(fallback, {}, { animate: false });
return;
}

originalPop();
};

return { pop };
};
Copy link
Contributor

Choose a reason for hiding this comment

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

high

useStack 훅이 처음 호출될 때의 스택 크기를 기준으로 pop 동작을 결정하고 있습니다. 이는 pop 함수가 실제로 실행되는 시점의 스택 상태와 다를 수 있어 예기치 않은 동작을 유발할 수 있습니다. pop 함수 내부에서 스택 정보를 가져오도록 수정하여 항상 최신 상태를 반영하도록 하는 것이 더 안전합니다.

Suggested change
export const useStack = () => {
const stack = actions.getStack();
const stackSize = stack.activities.length;
const { push, pop: originalPop } = useFlow();
const pop = (fallback?: ActivityName) => {
if (stackSize === 1 && fallback) {
push(fallback, {}, { animate: false });
return;
}
originalPop();
};
return { pop };
};
export const useStack = () => {
const { push, pop: originalPop } = useFlow();
const pop = (fallback?: ActivityName) => {
const stack = actions.getStack();
const stackSize = stack.activities.length;
if (stackSize === 1 && fallback) {
push(fallback, {}, { animate: false });
return;
}
originalPop();
};
return { pop };
};

Comment on lines 169 to 172
const handleBack = () => {
pop();
console.log('handleBack');
pop('SchedulePage');
};
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

디버깅을 위해 추가하신 console.log 구문이 남아있습니다. 머지 전 삭제하는 것을 권장합니다.

  const handleBack = () => {
    pop('SchedulePage');
  };

@github-actions
Copy link

@github-actions
Copy link

@github-actions
Copy link

@seseoju seseoju merged commit d3ce499 into develop Feb 26, 2026
2 checks passed
@seseoju seseoju deleted the feature/135 branch February 26, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 신규 기능을 추가합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] stackflow fallback pop 추가

2 participants