Skip to content

Commit

Permalink
feat: update sentry (#3326)
Browse files Browse the repository at this point in the history
# Description

Please include a summary of the changes and the related issue. Please
also include relevant motivation and context.

## Checklist before requesting a review

Please delete options that are not relevant.

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented hard-to-understand areas
- [ ] I have ideally added tests that prove my fix is effective or that
my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged

## Screenshots (if appropriate):
  • Loading branch information
StanGirard authored Oct 5, 2024
1 parent 306285b commit 3d9cbe5
Show file tree
Hide file tree
Showing 123 changed files with 2,772 additions and 1,013 deletions.
3 changes: 3 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ next-env.d.ts

# Sentry Config File
.sentryclirc

# Sentry Config File
.env.sentry-build-plugin
5 changes: 4 additions & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ ARG NEXT_PUBLIC_SHOW_TOKENS
ARG NEXT_PUBLIC_PROJECT_NAME
ARG NEXT_PUBLIC_POSTHOG_KEY
ARG NEXT_PUBLIC_POSTHOG_HOST
ARG SENTRY_AUTH_TOKEN

ENV NEXT_PUBLIC_ENV=$NEXT_PUBLIC_ENV
ENV NEXT_PUBLIC_BACKEND_URL=$NEXT_PUBLIC_BACKEND_URL
Expand All @@ -46,7 +47,7 @@ ENV NEXT_PUBLIC_SHOW_TOKENS=$NEXT_PUBLIC_SHOW_TOKENS
ENV NEXT_PUBLIC_PROJECT_NAME=$NEXT_PUBLIC_PROJECT_NAME
ENV NEXT_PUBLIC_POSTHOG_KEY=$NEXT_PUBLIC_POSTHOG_KEY
ENV NEXT_PUBLIC_POSTHOG_HOST=$NEXT_PUBLIC_POSTHOG_HOST

ENV SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN

# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
Expand Down Expand Up @@ -98,6 +99,8 @@ ARG NEXT_PUBLIC_POSTHOG_KEY
ENV NEXT_PUBLIC_POSTHOG_KEY=$NEXT_PUBLIC_POSTHOG_KEY
ARG NEXT_PUBLIC_POSTHOG_HOST
ENV NEXT_PUBLIC_POSTHOG_HOST=$NEXT_PUBLIC_POSTHOG_HOST
ARG SENTRY_AUTH_TOKEN
ENV SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN

# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
Expand Down
25 changes: 12 additions & 13 deletions frontend/Porter.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
version: v2
name: quivr-demo-front
services:
- name: quivr-frontend
run: ""
type: web
instances: 1
cpuCores: 0.2
ramMegabytes: 240
terminationGracePeriodSeconds: 30
port: 3000
domains:
- name: demo.quivr.app
sleep: false
- name: quivr-frontend
run: ""
type: web
instances: 1
cpuCores: 0.2
ramMegabytes: 240
terminationGracePeriodSeconds: 30
port: 3000
domains:
- name: demo.quivr.app
sleep: false
build:
context: ./frontend
method: docker
dockerfile: ./frontend/Dockerfile
envGroups:
- preview-frontend
- preview-frontend
autoRollback:
enabled: false

Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export const useAzureLogin = (): {
const signInWithAzure = async () => {
setIsPending(true);
const { error } = await supabase.auth.signInWithOAuth({
provider: 'azure',
provider: "azure",
options: {
scopes: 'email',
scopes: "email",
},
});
setIsPending(false);
Expand All @@ -32,4 +32,4 @@ export const useAzureLogin = (): {
signInWithAzure,
isPending,
};
};
};
2 changes: 1 addition & 1 deletion frontend/app/(auth)/login/page.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
font-size: Typography.$tiny;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
.ProseMirror p.is-editor-empty:first-child::before {
content: attr(data-placeholder);
float: left;
color: #adb5bd;
pointer-events: none;
height: 0;
content: attr(data-placeholder);
float: left;
color: #adb5bd;
pointer-events: none;
height: 0;
}

.ProseMirror * {
white-space: pre-wrap;
word-wrap: break-word;
white-space: pre-wrap;
word-wrap: break-word;
}

.mention {
display: none;
}
display: none;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,18 @@ import { LuArrowLeftFromLine } from "react-icons/lu";
import { useMenuContext } from "@/lib/context/MenuProvider/hooks/useMenuContext";
import { useDevice } from "@/lib/hooks/useDevice";

import styles from './MenuControlButton.module.scss';
import styles from "./MenuControlButton.module.scss";

export const MenuControlButton = (): JSX.Element => {
const { isOpened, setIsOpened } = useMenuContext();
const { isMobile } = useDevice();
const Icon = isOpened ? LuArrowLeftFromLine : GiHamburgerMenu;
const { isOpened, setIsOpened } = useMenuContext();
const { isMobile } = useDevice();
const Icon = isOpened ? LuArrowLeftFromLine : GiHamburgerMenu;

if (isOpened && isMobile) {
return <></>;
}
if (isOpened && isMobile) {
return <></>;
}

return (
<Icon
className={styles.menu_icon}
onClick={() => setIsOpened(!isOpened)}
/>
);
return (
<Icon className={styles.menu_icon} onClick={() => setIsOpened(!isOpened)} />
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ export const FileLine = ({
name,
selectable,
id,
icon
icon,
}: FileLineProps): JSX.Element => {
return (
<SyncElementLine
name={name}
selectable={selectable}
id={id}
isFolder={false}
icon= {icon}
icon={icon}
/>
);
};
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
* {
white-space: pre-line;
}
white-space: pre-line;
}
2 changes: 1 addition & 1 deletion frontend/app/chat/[chatId]/page.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
}
}
}
}
}
118 changes: 59 additions & 59 deletions frontend/app/colors.css
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
:root {
--white-0: #fcfcfc;
--white-1: #f8f8f8;
--white-2: #f4f4f4;

/* Black */
--black-0: #1f1f1f;
--black-1: #252525;
--black-2: #2b2b2b;
--black-3: #313131;
--black-4: #373737;
--black-5: #3d3d3d;
--black-6: #434343;
--black-7: #494949;

/* Grey */
--grey-O: #707070;
--grey-1: #818080;
--grey-2: #c8c8c8;
--grey-3: #cbcbcb;
--grey-4: #e7e9ec;
--grey-5: #d3d3d3;
--grey-6: #f5f5f5;

/* Primary */
--primary-0: #6142d4;
--primary-1: #d0c6f2;
--primary-2: #f5f3fd;

/* Accent */
--accent: #13abba;
/* Gold */
--gold: #b8860b;
--gold-lightest: #f0ebdd;;
/* Error */
--dangerous-dark: #e30c17;
--dangerous: #9b373c;
--dangerous-lightest: #eedddd;
/* Warning */
--warning: #c77d33;
--warning-lightest: #f2e9e0;
/* Success */
--success: #47a455;
--success-lightest: #d0edd4;

/* Code */
--code-yellow: #e6db74;
--code-grey: #f8f8f2;
--code-green: #a6e22e;
--code-purple: #ae81ff;
--code-red: #f92672;
--code-dark-grey: #f8f8f2;
--code-very-dark-grey: #75715e;
--code-blue: #66d9ef;
--code-orange: #fd971f;
}
--white-0: #fcfcfc;
--white-1: #f8f8f8;
--white-2: #f4f4f4;

/* Black */
--black-0: #1f1f1f;
--black-1: #252525;
--black-2: #2b2b2b;
--black-3: #313131;
--black-4: #373737;
--black-5: #3d3d3d;
--black-6: #434343;
--black-7: #494949;

/* Grey */
--grey-O: #707070;
--grey-1: #818080;
--grey-2: #c8c8c8;
--grey-3: #cbcbcb;
--grey-4: #e7e9ec;
--grey-5: #d3d3d3;
--grey-6: #f5f5f5;

/* Primary */
--primary-0: #6142d4;
--primary-1: #d0c6f2;
--primary-2: #f5f3fd;

/* Accent */
--accent: #13abba;

/* Gold */
--gold: #b8860b;
--gold-lightest: #f0ebdd;

/* Error */
--dangerous-dark: #e30c17;
--dangerous: #9b373c;
--dangerous-lightest: #eedddd;

/* Warning */
--warning: #c77d33;
--warning-lightest: #f2e9e0;

/* Success */
--success: #47a455;
--success-lightest: #d0edd4;

/* Code */
--code-yellow: #e6db74;
--code-grey: #f8f8f2;
--code-green: #a6e22e;
--code-purple: #ae81ff;
--code-red: #f92672;
--code-dark-grey: #f8f8f2;
--code-very-dark-grey: #75715e;
--code-blue: #66d9ef;
--code-orange: #fd971f;
}
22 changes: 10 additions & 12 deletions frontend/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
@import './colors.css';


@import "./colors.css";

main {
@apply max-w-screen-xl mx-auto flex flex-col;
Expand Down Expand Up @@ -101,18 +99,18 @@ body.dark_mode {
--background-success: var(--black-5);
--background-error: var(--black-5);
--background-pending: var(--black-5);

/* Borders */
--border-0: var(--black-5);
--border-1: var(--black-6);
--border-2: var(--black-7);

/* Icons */
--icon-0: var(--black-0);
--icon-1: var(--grey-0);
--icon-2: var(--grey-2);
--icon-3: var(--white-0);

/* Text */
--text-0: var(--black-0);
--text-1: var(--grey-0);
Expand Down Expand Up @@ -142,7 +140,7 @@ body.dark_mode {
.token.constant,
.token.symbol,
.token.deleted {
color: var(--code-red);
color: var(--code-red);
}

.token.boolean,
Expand All @@ -156,7 +154,7 @@ body.dark_mode {
.token.char,
.token.builtin,
.token.inserted {
color: var(--code-green);
color: var(--code-green);
}

.token.operator,
Expand All @@ -165,7 +163,7 @@ body.dark_mode {
.language-css .token.string,
.style .token.string,
.token.variable {
color: var(--code-grey);
color: var(--code-grey);
}

.token.atrule,
Expand All @@ -176,7 +174,7 @@ body.dark_mode {
}

.token.keyword {
color: var(--code-blue);
color: var(--code-blue);
}

.token.regex,
Expand Down Expand Up @@ -206,7 +204,7 @@ body.dark_mode {
}

.EmojiPickerReact.epr-dark-theme {
--epr-emoji-size: 20px !important;
--epr-emoji-size: 20px !important;
--epr-hover-bg-color: var(--primary-1) !important;
--epr-category-navigation-button-size: 24px !important;
--epr-category-label-bg-color: var(--background-0) !important;
Expand All @@ -231,4 +229,4 @@ body.dark_mode {

.react-colorful__saturation {
border-radius: 0 !important;
}
}
Loading

0 comments on commit 3d9cbe5

Please sign in to comment.