Merge pull request #1240 from AnishSarkar22/feat/resume-builder
Some checks failed
Build and Push Docker Images / tag_release (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_web, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-24.04-arm, linux/arm64, arm64) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_web, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-latest, linux/amd64, amd64) (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend) (push) Has been cancelled
Build and Push Docker Images / create_manifest (web, surfsense-web) (push) Has been cancelled

feat: resume builder
This commit is contained in:
Rohan Verma 2026-04-17 13:41:32 -07:00 committed by GitHub
commit 2b2453e015
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 1917 additions and 60 deletions

View file

@ -8,6 +8,8 @@ interface ReportPanelState {
wordCount: number | null;
/** When set, uses public endpoints for fetching report data (public shared chat) */
shareToken: string | null;
/** Content type of the report — "markdown" (default) or "typst" (resume) */
contentType: string;
}
const initialState: ReportPanelState = {
@ -16,6 +18,7 @@ const initialState: ReportPanelState = {
title: null,
wordCount: null,
shareToken: null,
contentType: "markdown",
};
/** Core atom holding the report panel state */
@ -38,7 +41,14 @@ export const openReportPanelAtom = atom(
title,
wordCount,
shareToken,
}: { reportId: number; title: string; wordCount?: number; shareToken?: string | null }
contentType,
}: {
reportId: number;
title: string;
wordCount?: number;
shareToken?: string | null;
contentType?: string;
}
) => {
if (!get(reportPanelAtom).isOpen) {
set(preReportCollapsedAtom, get(rightPanelCollapsedAtom));
@ -49,6 +59,7 @@ export const openReportPanelAtom = atom(
title,
wordCount: wordCount ?? null,
shareToken: shareToken ?? null,
contentType: contentType ?? "markdown",
});
set(rightPanelTabAtom, "report");
set(rightPanelCollapsedAtom, false);