-
Notifications
You must be signed in to change notification settings - Fork 4.7k
[PLAN-90] fix: persist page list sort preference after reload #9282
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
Open
alanssant0s
wants to merge
19
commits into
makeplane:preview
Choose a base branch
from
alanssant0s:fix/plan-90-persist-page-sort
base: preview
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+8,363
−1,205
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c353176
feat: add workspace sprint planning
alanssant0s ad69564
ci: promote development images to main
alanssant0s eb5049e
Merge pull request #1 from alanssant0s/plane-sprint-analysis
alanssant0s 7d9583a
feat: implement workspace sprint squads and automation members
alanssant0s 3e610e8
Handle routeFilters for sprint views
alanssant0s 29b87c7
Merge pull request #3 from alanssant0s/plane-sprint-analysis
alanssant0s baaefad
ci: deploy Dokploy after main image promotion
alanssant0s 87dbc2a
Merge pull request #5 from alanssant0s/plane-sprint-analysis
alanssant0s e559327
refactor: remove forum references and unused components
alanssant0s d1db722
feat: enhance issue pagination and grouping functionality
alanssant0s b2938b9
fix: address pagination issues in WorkspaceViewIssuesViewSet
alanssant0s 3057414
Merge pull request #7 from alanssant0s/squads-adjusts
alanssant0s eaaf13f
feat: add assigned-to-me issue filter
alanssant0s 6381e4e
feat: extend assigned-to-me filtering
alanssant0s cddec89
Merge pull request #8 from alanssant0s/squads-adjusts
alanssant0s 3a070b0
feat: expose project pages via API v1
alanssant0s ae94598
Merge pull request #10 from alanssant0s/squads-adjusts
alanssant0s d1b2111
feat(pages): add slash command to link to another page
alanssant0s 16076c5
fix(pages): persist page list sort preference in localStorage
alanssant0s File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| --- | ||
| description: Fluxo padrao para revisar, testar, mergear PRs e publicar em main | ||
| alwaysApply: true | ||
| --- | ||
|
|
||
| # PR, Deploy e Publicacao | ||
|
|
||
| Quando o usuario pedir para aceitar PRs, fazer deploy, publicar na `main` ou gerar/promover imagem Docker, siga este fluxo. | ||
|
|
||
| 1. Identifique o escopo antes de agir: liste PRs abertos com `gh pr list`, confirme repositorio, branch base (`development`, `main` ou a branch padrao do repo) e se ha worktree suja. Nao inclua `.env`, dumps, credenciais, venvs ou arquivos nao relacionados. | ||
| 2. Analise o conteudo do PR inteiro, nao apenas o ultimo commit: use `gh pr view`, `gh pr diff`, `git log base..head` e `git diff base...head`. | ||
| 3. Se houver dois ou mais PRs para o mesmo destino, teste o estado combinado sobre a branch base atualizada antes de mergear. Crie uma branch local temporaria, aplique os heads e resolva conflitos com cuidado. | ||
| 4. Rode validacoes locais antes do merge conforme o escopo: | ||
| - Monorepo/web/packages: `pnpm install --frozen-lockfile`, testes especificos adicionados/afetados, `pnpm build` ou build filtrado, e `pnpm check:lint` como informativo. | ||
| - API: testes relevantes via Docker conforme `apps/api/tests/RUNNING_TESTS.md`; use `docker compose -f docker-compose-test.yml run --rm api-tests pytest ...` para subsets e rode checagens/migrations relevantes quando houver alteracoes de modelo. | ||
| 5. Considere lint nao bloqueante apenas quando a falha vier de debitos antigos fora dos arquivos alterados. Reporte isso no resumo e confira diagnósticos dos arquivos tocados. | ||
| 6. Quando o PR base for `development`, mergeie primeiro em `development`, aguarde o workflow de build/push da imagem Docker e so depois crie PR `development -> main`. | ||
| 7. Para publicar na `main`, abra PR com resumo do que sera publicado e plano de testes. Mergeie apenas se `mergeStateStatus` estiver `CLEAN` e os checks relevantes estiverem verdes. | ||
| 8. Apos merge na `main`, acompanhe o workflow disparado em `main` ate concluir. Se houver promocao de imagem ja buildada em `development`, confirme que o workflow promoveu a imagem correta e disparou os webhooks esperados. | ||
| 9. Se CI falhar, leia `gh run view <id> --log-failed`, corrija a causa raiz em novo PR, mergeie e acompanhe novamente. Para falhas Docker/pnpm, verifique `pnpm-workspace.yaml`, `pnpm fetch/install --offline`, versao do pnpm, versao do Node da imagem e compatibilidade com lockfile. | ||
| 10. Ao finalizar, responda com links dos PRs, runs, checks executados e qualquer risco residual. | ||
|
|
||
| Nao use push direto para `main` ou `development` quando um PR for apropriado. Nao force push nem use comandos destrutivos sem pedido explicito. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| description: Validacoes obrigatorias antes de commit e PR | ||
| alwaysApply: true | ||
| --- | ||
|
|
||
| # Pre-Commit e Validacoes | ||
|
|
||
| Quando o usuario pedir para commitar, validar commit, preparar PR ou corrigir erro de hook, siga este fluxo. | ||
|
|
||
| 1. Use o hook real do repo: `.husky/pre-commit` roda `pnpm lint-staged`. Nao use `pre-commit run`, pois este repo nao usa `.pre-commit-config.yaml`. | ||
| 2. Antes de rodar o hook, confira `git status --short --branch` e preserve alteracoes existentes do usuario. Nao reverta arquivos sem pedido explicito. | ||
| 3. O `lint-staged` valida apenas arquivos staged. Se corrigir arquivos que fazem parte do commit, stageie essas correcoes antes de reexecutar `pnpm lint-staged`. | ||
| 4. Trate warnings do `pnpm exec oxlint --fix --deny-warnings` como bloqueantes. Corrija a causa raiz em vez de ignorar o hook. | ||
| 5. Para falhas comuns: | ||
| - `consistent-function-scoping`: mova funcoes que nao capturam escopo para fora do componente/funcao. | ||
| - `promise(always-return)`: retorne o valor dentro de `.then()` ou lance erro. | ||
| - `no-shadow`: renomeie variaveis locais/desestruturadas que colidem com nomes do escopo externo. | ||
| - `no-unneeded-ternary`: substitua `cond ? true : false` por `cond`. | ||
| - `no-map-spread`: use `Object.assign({}, item, updates)` quando precisar manter copy-on-write. | ||
| 6. Depois que o hook passar, confira `git status --short --branch` e `git diff --cached --stat` para avisar quais arquivos ficaram staged. | ||
|
|
||
| Se `oxfmt` ou `oxlint --fix` modificar arquivos, inclua essas modificacoes no stage antes de tentar o commit novamente. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,175 @@ | ||
| name: Build Production Docker Images | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| app_release: | ||
| description: "Image tag to publish and use as APP_RELEASE" | ||
| required: false | ||
| type: string | ||
| push: | ||
| branches: | ||
| - development | ||
| - main | ||
| - master | ||
| - preview | ||
| - canary | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| env: | ||
| PRODUCTION_APP_BASE_URL: ${{ vars.PRODUCTION_APP_BASE_URL || 'https://plane.agncflamingo.com.br' }} | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build-and-push: | ||
| name: Build ${{ matrix.image }} | ||
| if: github.ref_name != 'main' | ||
| runs-on: ubuntu-22.04 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - image: plane-frontend | ||
| context: . | ||
| dockerfile: ./apps/web/Dockerfile.web | ||
| - image: plane-space | ||
| context: . | ||
| dockerfile: ./apps/space/Dockerfile.space | ||
| - image: plane-admin | ||
| context: . | ||
| dockerfile: ./apps/admin/Dockerfile.admin | ||
| - image: plane-live | ||
| context: . | ||
| dockerfile: ./apps/live/Dockerfile.live | ||
| - image: plane-backend | ||
| context: ./apps/api | ||
| dockerfile: ./apps/api/Dockerfile.api | ||
| - image: plane-proxy | ||
| context: ./apps/proxy | ||
| dockerfile: ./apps/proxy/Dockerfile.ce | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Prepare image variables | ||
| id: vars | ||
| shell: bash | ||
| run: | | ||
| image_namespace="${GITHUB_REPOSITORY,,}" | ||
| app_release="${{ github.event.inputs.app_release }}" | ||
|
|
||
| if [ -z "$app_release" ]; then | ||
| app_release="$(echo "$GITHUB_REF_NAME" | tr '[:upper:]' '[:lower:]' | sed 's#[^a-z0-9._-]#-#g')" | ||
| fi | ||
|
|
||
| echo "image_namespace=$image_namespace" >> "$GITHUB_OUTPUT" | ||
| echo "app_release=$app_release" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Login to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Docker metadata | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: ghcr.io/${{ steps.vars.outputs.image_namespace }}/${{ matrix.image }} | ||
| tags: | | ||
| type=raw,value=${{ steps.vars.outputs.app_release }} | ||
| type=sha,prefix=sha-,format=short | ||
| type=raw,value=latest,enable={{is_default_branch}} | ||
|
|
||
| - name: Build and push | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: ${{ matrix.context }} | ||
| file: ${{ matrix.dockerfile }} | ||
| platforms: linux/amd64 | ||
| push: true | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| build-args: | | ||
| VITE_API_BASE_URL=${{ env.PRODUCTION_APP_BASE_URL }} | ||
| VITE_ADMIN_BASE_URL=${{ env.PRODUCTION_APP_BASE_URL }} | ||
| VITE_SPACE_BASE_URL=${{ env.PRODUCTION_APP_BASE_URL }} | ||
| VITE_LIVE_BASE_URL=${{ env.PRODUCTION_APP_BASE_URL }} | ||
| VITE_WEB_BASE_URL=${{ env.PRODUCTION_APP_BASE_URL }} | ||
|
|
||
| promote-main: | ||
| name: Promote ${{ matrix.image }} to main | ||
| if: github.ref_name == 'main' | ||
| runs-on: ubuntu-22.04 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| image: | ||
| - plane-frontend | ||
| - plane-space | ||
| - plane-admin | ||
| - plane-live | ||
| - plane-backend | ||
| - plane-proxy | ||
|
|
||
| steps: | ||
| - name: Prepare image variables | ||
| id: vars | ||
| shell: bash | ||
| run: | | ||
| image_namespace="${GITHUB_REPOSITORY,,}" | ||
| image="ghcr.io/${image_namespace}/${{ matrix.image }}" | ||
|
|
||
| echo "source_image=${image}:development" >> "$GITHUB_OUTPUT" | ||
| echo "main_image=${image}:main" >> "$GITHUB_OUTPUT" | ||
| echo "latest_image=${image}:latest" >> "$GITHUB_OUTPUT" | ||
| echo "sha_image=${image}:sha-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Login to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Promote development image | ||
| shell: bash | ||
| run: | | ||
| docker buildx imagetools inspect "${{ steps.vars.outputs.source_image }}" | ||
| docker buildx imagetools create \ | ||
| -t "${{ steps.vars.outputs.main_image }}" \ | ||
| -t "${{ steps.vars.outputs.latest_image }}" \ | ||
| -t "${{ steps.vars.outputs.sha_image }}" \ | ||
| "${{ steps.vars.outputs.source_image }}" | ||
|
|
||
| deploy-dokploy: | ||
| name: Deploy Dokploy compose | ||
| if: github.ref_name == 'main' | ||
| needs: promote-main | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - name: Trigger Dokploy deployment | ||
| env: | ||
| DOKPLOY_URL: ${{ secrets.DOKPLOY_URL }} | ||
| DOKPLOY_API_KEY: ${{ secrets.DOKPLOY_API_KEY }} | ||
| DOKPLOY_COMPOSE_ID: ${{ secrets.DOKPLOY_COMPOSE_ID }} | ||
| shell: bash | ||
| run: | | ||
| curl --fail-with-body --request POST "${DOKPLOY_URL}/api/compose.deploy" \ | ||
| --header "Content-Type: application/json" \ | ||
| --header "x-api-key: ${DOKPLOY_API_KEY}" \ | ||
| --data "{\"composeId\":\"${DOKPLOY_COMPOSE_ID}\"}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Copyright (c) 2023-present Plane Software, Inc. and contributors | ||
| # SPDX-License-Identifier: AGPL-3.0-only | ||
| # See the LICENSE file for details. | ||
|
|
||
| from django.urls import path | ||
|
|
||
| from plane.api.views.page import PageViewSetV1 | ||
|
|
||
| urlpatterns = [ | ||
| path( | ||
| "workspaces/<str:slug>/projects/<uuid:project_id>/pages/", | ||
| PageViewSetV1.as_view({"get": "list", "post": "create"}), | ||
| name="project-pages-v1", | ||
| ), | ||
| path( | ||
| "workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:pk>/", | ||
| PageViewSetV1.as_view( | ||
| { | ||
| "get": "retrieve", | ||
| "patch": "partial_update", | ||
| "delete": "destroy", | ||
| } | ||
| ), | ||
| name="project-pages-detail-v1", | ||
| ), | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Copyright (c) 2023-present Plane Software, Inc. and contributors | ||
| # SPDX-License-Identifier: AGPL-3.0-only | ||
| # See the LICENSE file for details. | ||
|
|
||
| from plane.api.middleware.api_authentication import APIKeyAuthentication | ||
| from plane.api.rate_limit import ApiKeyRateThrottle | ||
| from plane.app.views.page.base import PageViewSet | ||
|
|
||
|
|
||
| class PageViewSetV1(PageViewSet): | ||
| authentication_classes = [APIKeyAuthentication] | ||
| throttle_classes = [ApiKeyRateThrottle] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: makeplane/plane
Length of output: 231
🏁 Script executed:
Repository: makeplane/plane
Length of output: 1587
🏁 Script executed:
Repository: makeplane/plane
Length of output: 363
🏁 Script executed:
Repository: makeplane/plane
Length of output: 204
🏁 Script executed:
Repository: makeplane/plane
Length of output: 1864
🏁 Script executed:
Repository: makeplane/plane
Length of output: 2142
🏁 Script executed:
Repository: makeplane/plane
Length of output: 1336
🏁 Script executed:
Repository: makeplane/plane
Length of output: 2591
🏁 Script executed:
Repository: makeplane/plane
Length of output: 693
🏁 Script executed:
Repository: makeplane/plane
Length of output: 506
🏁 Script executed:
Repository: makeplane/plane
Length of output: 715
🏁 Script executed:
Repository: makeplane/plane
Length of output: 307
🏁 Script executed:
Repository: makeplane/plane
Length of output: 369
🏁 Script executed:
Repository: makeplane/plane
Length of output: 1016
🏁 Script executed:
Repository: makeplane/plane
Length of output: 2155
🏁 Script executed:
Repository: makeplane/plane
Length of output: 437
🏁 Script executed:
Repository: makeplane/plane
Length of output: 1242
Use
UUIDFieldfor annotatedglobal_sprint_idvalue.Line 764 defines
global_sprint_idasPrimaryKeyRelatedField, but the queryset annotation inapps/api/plane/app/views/issue/base.pyprovides a scalar UUID viavalues("sprint_id")within a Subquery, not a related model instance. This type mismatch can cause serialization errors on issue list responses.Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents