Commit Graph

40108 Commits

Author SHA1 Message Date
Manav Rathi
cd634b98a0 [desktop] Next release train (#5465) 2025-03-28 18:28:25 +05:30
Manav Rathi
7b871195c8 [desktop] Next release train 2025-03-28 18:25:48 +05:30
Vishnu Mohandas
bed0b0f902 [docs] Update links for photos (#5462) 2025-03-28 18:14:50 +05:30
vishnukvmd
cdf46acd8b Fix 2025-03-28 18:14:04 +05:30
vishnukvmd
af7698e29e Fix links 2025-03-28 18:13:14 +05:30
vishnukvmd
eb9e97080f [docs] Update links for photos 2025-03-28 16:49:41 +05:30
Vishnu Mohandas
46a090535f [server] Up free storage (#5461)
## Description

## Tests
2025-03-28 16:46:29 +05:30
Laurens Priem
360223bd2f [mob][photos] Image embedding caching perf (#5459)
## Description

Made changes to more efficiently handle image embeddings caching,
keeping them cached only in MLComputer and only for limited times when
the user needs it.

## Tests

Tested in debug mode on my pixel phone.
2025-03-28 14:13:42 +05:30
laurenspriem
d11ff14ecd Remove embeddings cache after inactivity 2025-03-28 13:55:23 +05:30
Manav Rathi
60781ba86b [meta] Allow running CodeQL manually (#5458)
Necessary to get GitHub to resync the status until the next time it runs
2025-03-28 13:50:38 +05:30
Manav Rathi
02d2db3e43 [meta] Allow running CodeQL manually
Necessary to get GitHub to resync the status until the next time it runs
2025-03-28 13:49:53 +05:30
Manav Rathi
4035a06040 [meta] Create custom codeql.yml (#5457)
Here is the original autogenerated template on which this is based:

```yaml
# For most projects, this workflow file will not need changing; you simply need # to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages.
#
name: "CodeQL Advanced"

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]
  schedule:
    - cron: '22 1 * * 1'

jobs:
  analyze:
    name: Analyze (${{ matrix.language }}) # Runner size impacts CodeQL analysis time. To learn more, please see:
    #   - https://gh.io/recommended-hardware-resources-for-running-codeql
    #   - https://gh.io/supported-runners-and-hardware-resources
    #   - https://gh.io/using-larger-runners (GitHub.com only)
    # Consider using larger runners or machines with greater resources for possible analysis time improvements.
    runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
    permissions:
      # required for all workflows
      security-events: write

      # required to fetch internal or private CodeQL packs
      packages: read

      # only required for workflows in private repositories
      actions: read
      contents: read

    strategy: fail-fast: false matrix: include:
        - language: actions build-mode: none
        - language: c-cpp build-mode: autobuild - language: go build-mode: autobuild - language: java-kotlin build-mode: autobuild - language: javascript-typescript build-mode: none - language: ruby build-mode: none - language: swift build-mode: autobuild # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' # Use `c-cpp` to analyze code written in C, C++ or both # Use 'java-kotlin' to analyze code written in Java, Kotlin or both # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages steps:
    - name: Checkout repository uses: actions/checkout@v4

    # Add any setup steps before running the `github/codeql-action/init` action.
    # This includes steps like installing compilers or runtimes (`actions/setup-node`
    # or others). This is typically only required for manual builds.
    # - name: Setup runtime (example)
    #   uses: actions/setup-example@v1

    # Initializes the CodeQL tools for scanning.
    - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file.

        # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
        # queries: security-extended,security-and-quality

    # If the analyze step fails for one of the languages you are analyzing with
    # "We were unable to automatically build your code", modify the matrix above
    # to set the build mode to "manual" for that language. Then modify this step
    # to build your code.
    # ℹ️ Command-line programs to run using the OS shell.
    # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
    - if: matrix.build-mode == 'manual' shell: bash run: | echo 'If you are using a "manual" build mode for one or more of the' \ 'languages you are analyzing, replace this with the commands to build' \ 'your code, for example:' echo '  make bootstrap' echo '  make release' exit 1

    - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}"
```
2025-03-28 13:47:51 +05:30
Manav Rathi
2d16d958e3 [meta] Create custom codeql.yml
Here is the original autogenerated template from which this is based:

----

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]
  schedule:
    - cron: '22 1 * * 1'

jobs:
  analyze:
    name: Analyze (${{ matrix.language }})
    # Runner size impacts CodeQL analysis time. To learn more, please see:
    #   - https://gh.io/recommended-hardware-resources-for-running-codeql
    #   - https://gh.io/supported-runners-and-hardware-resources
    #   - https://gh.io/using-larger-runners (GitHub.com only)
    # Consider using larger runners or machines with greater resources for possible analysis time improvements.
    runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
    permissions:
      # required for all workflows
      security-events: write

      # required to fetch internal or private CodeQL packs
      packages: read

      # only required for workflows in private repositories
      actions: read
      contents: read

    strategy:
      fail-fast: false
      matrix:
        include:
        - language: actions
          build-mode: none
        - language: c-cpp
          build-mode: autobuild
        - language: go
          build-mode: autobuild
        - language: java-kotlin
          build-mode: autobuild
        - language: javascript-typescript
          build-mode: none
        - language: ruby
          build-mode: none
        - language: swift
          build-mode: autobuild
        # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
        # Use `c-cpp` to analyze code written in C, C++ or both
        # Use 'java-kotlin' to analyze code written in Java, Kotlin or both
        # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
        # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
        # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
        # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
        # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
    steps:
    - name: Checkout repository
      uses: actions/checkout@v4

    # Add any setup steps before running the `github/codeql-action/init` action.
    # This includes steps like installing compilers or runtimes (`actions/setup-node`
    # or others). This is typically only required for manual builds.
    # - name: Setup runtime (example)
    #   uses: actions/setup-example@v1

    # Initializes the CodeQL tools for scanning.
    - name: Initialize CodeQL
      uses: github/codeql-action/init@v3
      with:
        languages: ${{ matrix.language }}
        build-mode: ${{ matrix.build-mode }}
        # If you wish to specify custom queries, you can do so here or in a config file.
        # By default, queries listed here will override any specified in a config file.
        # Prefix the list here with "+" to use these queries and those in the config file.

        # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
        # queries: security-extended,security-and-quality

    # If the analyze step fails for one of the languages you are analyzing with
    # "We were unable to automatically build your code", modify the matrix above
    # to set the build mode to "manual" for that language. Then modify this step
    # to build your code.
    # ℹ️ Command-line programs to run using the OS shell.
    # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
    - if: matrix.build-mode == 'manual'
      shell: bash
      run: |
        echo 'If you are using a "manual" build mode for one or more of the' \
          'languages you are analyzing, replace this with the commands to build' \
          'your code, for example:'
        echo '  make bootstrap'
        echo '  make release'
        exit 1

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v3
      with:
        category: "/language:${{matrix.language}}"
2025-03-28 13:44:49 +05:30
laurenspriem
a682fb4ece cleanup 2025-03-28 13:43:40 +05:30
laurenspriem
bc65e2c256 don't cache embeddings on startup 2025-03-28 13:41:16 +05:30
laurenspriem
3457cc1369 log embeddings retrieval time 2025-03-28 13:40:58 +05:30
laurenspriem
5ffd513826 Speed up embedding db call 2025-03-28 13:39:55 +05:30
Manav Rathi
d1df2962cb [meta] Granular action permissions (#5456) 2025-03-28 13:08:45 +05:30
Manav Rathi
cf7d46fd70 go-rel
ref: https://github.com/wangyoucao577/go-release-action?tab=readme-ov-file#basic-example
2025-03-28 13:02:19 +05:30
Manav Rathi
875a747e24 granular perms / release
"only required permissions for the action specified (which is contents: write)"
- https://github.com/ncipollo/release-action?tab=readme-ov-file#notes
2025-03-28 12:57:41 +05:30
Manav Rathi
0e4fa1ad4c ro 2025-03-28 12:57:41 +05:30
laurenspriem
939d1a5d40 properly clear isolate cache 2025-03-28 12:47:22 +05:30
Manav Rathi
0f62c4fa79 granular perms / docker-push
ref: https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#authenticating-to-package-registries-with-repository-scoped-permissions
2025-03-28 12:32:33 +05:30
Manav Rathi
038f6b33e1 granular perms [crowdin] 2025-03-28 12:22:59 +05:30
laurenspriem
bd0818ec7d Reduce time to isolate disposal 2025-03-28 11:57:21 +05:30
laurenspriem
1267587ae5 Fix using plugins in regular isolates 2025-03-28 11:51:34 +05:30
laurenspriem
168a4936f8 cache clip embeddings inside MLComputer isolate 2025-03-28 11:42:06 +05:30
Manav Rathi
eb11d80d79 [desktop] photosd-v1.7.11 (#5455) photosd-v1.7.11 2025-03-28 11:15:31 +05:30
Manav Rathi
dbc1cec05a [desktop] photosd-v1.7.11 2025-03-28 11:12:50 +05:30
Manav Rathi
95c9f5877c [docs] AppImage icon FAQ (#5454) 2025-03-28 11:09:58 +05:30
Manav Rathi
34034a77a2 Fix link 2025-03-28 11:08:55 +05:30
Manav Rathi
1da4770728 [docs] AppImage icon FAQ 2025-03-28 11:06:58 +05:30
Manav Rathi
353b2274d1 [docs] Add linux icon update FAQ (#5453) 2025-03-28 08:47:45 +05:30
Manav Rathi
56f15a33af [docs] Add linux icon update FAQ 2025-03-28 08:46:10 +05:30
Manav Rathi
85e0fef80b [server] Quickstart: don't rely on the -w flag for base64 (#5452)
Tested on macOS, Ubuntu (docker), Alpine (docker)
2025-03-28 08:15:30 +05:30
Manav Rathi
f3eb4c9acf Don't silently fail if docker is not installed 2025-03-28 08:10:03 +05:30
Manav Rathi
70924b7416 Don't rely on the -w flag for base64 2025-03-28 08:06:43 +05:30
Neeraj
21028e4985 [mob] Improve ignored file identifier for android (#5451)
## Description
Handle the case where some files were incorrectly ignored for upload
because device reused deleted file name.

## Tests
2025-03-28 07:28:35 +05:30
Neeraj Gupta
4ba22fd677 Improve ignored file identifier for android 2025-03-28 07:19:55 +05:30
laurenspriem
ac43ecf45b Make MLComputer a regular isolate 2025-03-27 16:07:28 +05:30
laurenspriem
a974a95fb2 Auto dispose face thumbnail generator isolate 2025-03-27 16:06:36 +05:30
laurenspriem
eb7f350102 Separate face thumbnail generator from embeddings 2025-03-27 16:04:13 +05:30
Manav Rathi
b2e4b82d5c [web] Video streaming WIP - Part x/x (#5449) 2025-03-27 14:30:33 +05:30
Neeraj
a88e281800 [mob] Log sync status when uploadIcon is hidden (#5448)
## Description

## Tests
2025-03-27 14:18:12 +05:30
Neeraj
279319bd52 [mob] Fix discovery section reload condition (#5447)
## Description
Previous condition didn't handle the case when the cities were not
loaded when discovery section was getting computed.
## Tests
2025-03-27 14:18:00 +05:30
Neeraj Gupta
6a3c3d5b5b Log sync status when uploadIcon is hidden 2025-03-27 14:17:10 +05:30
Neeraj Gupta
f36cc9ec06 [mob] Fix discovery section reload condition 2025-03-27 14:08:36 +05:30
Manav Rathi
8981668052 Tweaks 2025-03-27 13:29:46 +05:30
Manav Rathi
cba4f538f8 grad 2025-03-27 12:56:26 +05:30
Manav Rathi
8b787c7373 rgba => rgb
"The rgba() functional notation is an alias for rgb(). They are exactly equivalent. It is recommended to use rgb()." - MDN

https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb
2025-03-27 12:50:50 +05:30