Skip to content
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

Use assistant (search and AI) from cozy-dataproxy-lib #3266

Merged
merged 8 commits into from
Dec 18, 2024
Merged

Use assistant (search and AI) from cozy-dataproxy-lib #3266

merged 8 commits into from
Dec 18, 2024

Conversation

zatteo
Copy link
Contributor

@zatteo zatteo commented Dec 13, 2024

To do

### 🔧 Tech

* Use Assistant (search and AI) from cozy-dataproxy-lib

@zatteo zatteo marked this pull request as ready for review December 17, 2024 09:49
Copy link
Member

@Merkur39 Merkur39 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

{isPublic ? (
children
) : (
<DataProxyProvider>{children}</DataProxyProvider>
Copy link
Contributor

Choose a reason for hiding this comment

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

je crois qu'on gère les providers public autrement 🤔
DriveProvider est partagé entre les différentes targets, mais ensuite chaque target a ses propres provider, il me semble

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Je suis pas hyper fan de cette solution mais j'ai pas trouvé de meilleur endroit. En regardant le code la seule différence que j'ai vu entre public et non public c'est la prop isPublic pour la target public <App isPublic ...></App>

@@ -15,5 +15,12 @@ jest.mock('cozy-intent', () => ({
useWebviewIntent: jest.fn()
}))

jest.mock('cozy-dataproxy-lib', () => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

pourquoi fait-on ça ? Un commentaire serait bienvenu je pense. Est-ce qu'on devrait généraliser l'approche à toutes les libs ?

Copy link
Contributor Author

@zatteo zatteo Dec 18, 2024

Choose a reason for hiding this comment

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

Deux raisons :

  • les tests échouent avec l'import de cozy-dataproxy-lib avec des sombres histoires de babel pas à jour (et je n'ai pas trop envie d'investiguer ça maintenant)
  • il n'y a aucune raison de tester ces composants dans les apps qui sont autonomes

Pas sûr que ce soit généralisable.

Copy link

bundlemon bot commented Dec 18, 2024

BundleMon

Files updated (6)
Status Path Size Limits
public/drive.(hash).js
1.85MB (+241.17KB +14.54%) -
vendors/drive.(hash).js
2.08MB (+235.23KB +12.41%) -
intents/drive.(hash).js
82.2KB (+130B +0.15%) -
manifest.webapp
1.92KB (+48B +2.5%) -
app-drive.(hash).min.css
10.31KB (-399B -3.64%) -
app/drive.(hash).js
151.36KB (-5.24KB -3.34%) -
Unchanged files (12)
Status Path Size Limits
public/pdf.worker.entry.(hash).worker.js
345.35KB -
services/qualificationMigration/drive.js
282.46KB -
services/dacc/drive.js
263.35KB -
public/cozy-client-js.js
159.28KB -
public/drive.(hash).min.css
39.46KB -
onlyOffice/slide.pptx
24.83KB -
intents-drive.(hash).min.css
8.44KB -
onlyOffice/text.docx
5.85KB -
onlyOffice/spreadsheet.xlsx
5.02KB -
index.html
595B -
intents/index.html
507B -
manifest.json
185B -

Total files change +470.95KB +9.53%

Groups updated (4)
Status Path Size Limits
public/**
2.4MB (+241.17KB +10.89%) -
vendors/**
2.08MB (+235.23KB +12.41%) -
intents/**
82.7KB (+128B +0.15%) -
app/**
151.36KB (-5.24KB -3.34%) -
Unchanged groups (3)
Status Path Size Limits
services/**
545.81KB -
onlyOffice/**
35.7KB -
img/**
5.85KB -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

We need to update cozy-scripts to 8.4.0 to support the lib.
We can just replace the previous search view by the new one easily
because both are full page modal.
stop blocking PR for +4kB, use bundlemon monitor to check weight peaks
@zatteo zatteo merged commit 2265a18 into master Dec 18, 2024
4 checks passed
@zatteo zatteo deleted the search branch December 18, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants