Skip to content

Auto Advance Email on Archive #369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 58 commits into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
b45ad8e
fix: web depends on SRH and uses .env file in apps/web
Feb 27, 2025
ffd4a7b
Revert "fix: web depends on SRH and uses .env file in apps/web"
Mar 5, 2025
05c7550
adjust delete user
elie222 Feb 27, 2025
1210f5f
allow more time for delete
elie222 Feb 27, 2025
c36a5d6
delete user in 2 steps
elie222 Feb 27, 2025
95e1f6c
adjust delete
elie222 Feb 27, 2025
b528bf4
adjust delete to run in parallel
elie222 Feb 27, 2025
c8c9236
pricing
elie222 Feb 27, 2025
bb9cd61
simplify tooltips
elie222 Feb 27, 2025
baeb4ba
adjust payment failed
elie222 Feb 27, 2025
713e6e2
Store payments in db
elie222 Feb 27, 2025
424b9ae
processor type enum
elie222 Feb 27, 2025
fc89b47
payment tax
elie222 Feb 27, 2025
ee97594
use processor payment date
elie222 Feb 27, 2025
0eece19
remove unused table
elie222 Feb 27, 2025
840ff15
add key to survey
elie222 Feb 27, 2025
84573ae
adjust onboarding questions
elie222 Feb 27, 2025
edff224
adjust question
elie222 Feb 27, 2025
74b3177
skip upgrade button
elie222 Feb 27, 2025
1d000e6
hide unused onboarding/new senres. change copy
elie222 Feb 27, 2025
d1c390e
remove unused vars
elie222 Feb 27, 2025
a052c62
delete empty page
elie222 Feb 28, 2025
e434d8d
Adjust api auth
elie222 Feb 28, 2025
79001a7
remove any. infer types
elie222 Feb 28, 2025
6446b06
Add skeleton for mcp server
elie222 Feb 27, 2025
6c56f48
Add reply tracker api for mcp server
elie222 Feb 28, 2025
bf14dfd
mcp server that makes api calls
elie222 Feb 28, 2025
30bbfbb
adjust api key
elie222 Feb 28, 2025
24e3c01
Working MCP
elie222 Mar 1, 2025
3738ba9
fix test
elie222 Mar 1, 2025
6b847f5
coderabbit fixes
elie222 Mar 1, 2025
2d0f197
WIP: Add support for OpenRouter
elie222 Mar 1, 2025
514c84b
Remove nullish for cold email check as it broke openrouter
elie222 Mar 1, 2025
13ab1c8
adjust limit for reply tracker and admin page
elie222 Mar 1, 2025
ff70303
remove unused vars
elie222 Mar 1, 2025
a42fe8e
Show labels for reply tracker and test views
elie222 Mar 2, 2025
60ab460
rename to user labels
elie222 Mar 2, 2025
f98009b
adjust copy
elie222 Mar 3, 2025
6f00eeb
dont automate replies
elie222 Mar 3, 2025
f3560c1
Add set up page
elie222 Mar 3, 2025
06f4d7b
better check for bulk unsub set up
elie222 Mar 3, 2025
0cfe8d0
fix setup
elie222 Mar 3, 2025
5a63225
filter sent
elie222 Mar 3, 2025
5882985
update copy
elie222 Mar 4, 2025
49925c7
filter sent
elie222 Mar 4, 2025
1ee0b74
filter sent
elie222 Mar 4, 2025
bec05e9
allow crisp
elie222 Mar 4, 2025
3ea5f06
Merge remote-tracking branch 'upstream/main' into shiva-first-issues
Mar 5, 2025
6a66517
Merge remote-tracking branch 'upstream/main'
Mar 5, 2025
f495776
#345 auto advance email
Mar 5, 2025
c968e1d
Merge branch 'shiva-first-issues'
Mar 5, 2025
8f64321
add coderabbit suggestions
Mar 5, 2025
e2a69f9
Merge remote-tracking branch 'upstream/main'
Mar 7, 2025
a36295c
fix: open next email on archive
gshiva53 Mar 7, 2025
73779b6
fix: close email panel when only thread on archive
gshiva53 Mar 7, 2025
e071574
fix: change function name
gshiva53 Mar 7, 2025
25887f6
fix: change name
gshiva53 Mar 7, 2025
163610e
Update apps/web/components/email-list/EmailList.tsx
gshiva53 Mar 7, 2025
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
19 changes: 19 additions & 0 deletions apps/web/components/email-list/EmailList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,24 @@ export function EmailList({
}, 100);
}

function setPrevOrNextRow() {
if (threads.length === 1) setOpenThreadId(threads[0].id);

const openedRowIndex = threads.findIndex(
(thread) => thread.id === openThreadId,
);

if (openedRowIndex === -1 || threads.length === 0) closePanel();

const rowIndex =
openedRowIndex < threads.length - 1
? openedRowIndex + 1
: openedRowIndex - 1;

const prevOrNextRowId = threads[rowIndex].id;
setOpenThreadId(prevOrNextRowId);
}

const { executingPlan, rejectingPlan, executePlan, rejectPlan } =
useExecutePlan(refetch);

Expand Down Expand Up @@ -491,6 +509,7 @@ export function EmailList({
row={openedRow}
onPlanAiAction={onPlanAiAction}
onArchive={onArchive}
OpenEmailOnArchive={setPrevOrNextRow}
close={closePanel}
executePlan={executePlan}
rejectPlan={rejectPlan}
Expand Down
1 change: 0 additions & 1 deletion apps/web/components/email-list/EmailListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const EmailListItem = forwardRef(
onSelected: (id: string) => void;
onPlanAiAction: (thread: Thread) => void;
onArchive: (thread: Thread) => void;

executingPlan: boolean;
rejectingPlan: boolean;
executePlan: (thread: Thread) => Promise<void>;
Expand Down
5 changes: 3 additions & 2 deletions apps/web/components/email-list/EmailPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function EmailPanel({
row,
onPlanAiAction,
onArchive,
OpenEmailOnArchive,
close,
executingPlan,
rejectingPlan,
Expand All @@ -21,8 +22,8 @@ export function EmailPanel({
row: Thread;
onPlanAiAction: (thread: Thread) => void;
onArchive: (thread: Thread) => void;
OpenEmailOnArchive: () => void;
close: () => void;

executingPlan: boolean;
rejectingPlan: boolean;
executePlan: (thread: Thread) => Promise<void>;
Expand Down Expand Up @@ -57,7 +58,7 @@ export function EmailPanel({
onPlanAiAction={() => onPlanAiAction(row)}
onArchive={() => {
onArchive(row);
close();
OpenEmailOnArchive();
}}
refetch={refetch}
/>
Expand Down
1 change: 1 addition & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.