text:
Migrate WorkVersions with globus states that no longer exist

The following globus-related states no longer exist:
- globus_account_setup
- globus_setup_pending
- globus_setup_first_draft
- globus_setup_version_draft

WorkVersions with those states need to be migrated to avoid errors if the user tries to interact with them. As of 7/7/2023:

prod with state globus_setup_first_draft:

work 6641 / workversion 8625 (dmgordon) (migrated 2023-07-11)

stage with state globus_setup_first_draft:

work 19046 / workversion 19569 (amyehodge)
work 19048 / workversion 19571 (lwrubel)
work 19049 / workversion 19573 (lwrubel)
work 19053 / workversion 19579 (astridu)
work 19060 / workversion 19587 (astridu)

qa: already migrated

What the user sees if they try to interact with a work in a deleted state:

After latest code is deployed to prod, run the following steps on the rails console:
wv = WorkVersion.find(8625)
wv.state = "first_draft"
wv.save!
GlobusSetupJob.perform_later(wv)

This will set up the endpoint on Globus and add it to the work version record, give the user permissions to the endpoint, and send emails from SDR and Globus.

i think this work is done now, so closing, but feel free to reopen if that was premature

authors: jmartin-sul lwrubel

repo: sul-dlss/happy-heron


text:
fix: fixed regex pattern to work with all playlist links

Subject: playlist controller regex pattern fix relates to issue #82

Thanks for the fix :) can you add 2 tests, one for playlist/featured path and one for jiosaavn.com / saavn.com domain?

Okay

Tailwind CDN is down, We need to use other reliable CDN providers for tailwind!

@saibendalam looks good to me, can you remove package-lock.json? We're using bun so don't need to commit it, thanks

done

source: gharchive/pull-request

authors: saibendalam sbendalam sumitkolhe

repo: sumitkolhe/jiosaavn-api

license: MIT

license_type: permissive

license_source: github-api


text:
Questions about annotations not specified in EmmyLua

Is there a reference to the annotations that are not listed in EmmyLua page? Especially @meta, I'm curious about its meaning, as the others can be guessed by their names.
And what does it mean to have a * in a type annotation? I noticed that while typing, many types/tables like string, table, os, etc, as seen on the screenshot.  Like:

@meta is is used internally by me. For example, when you find references of print, it will filter out the results from the @meta file.
table* is used to distinguish the type of literal and library:
local v = {} --> table
local v = table -> table*

Has been renamed to tablelib bitlib...

source: gharchive/issue

repo: sumneko/lua-language-server


text:
UI not loading

admin, report, scoreboard not currently loading.
Issue is with plotly library.

react-plotly.js 2.3.0 doesn't work with const Plot = createPlotlyComponent(Plotly);
Explicitly using version 2.2.0 which works.

repo: sumwonyuno/cp-scoring


text:
Feature/sdk initial ver

PR Description
SDK initial version 및 example code 추가
Test
Related Issues
Anything Else? (Optional) Optional section (e.g., code usage, experimental results, TODO)
//: # (If there are any other things (e.g., code usage, experimental results, TODO), please explain them.)

@dongminlee94
동민님 websocket 로직에서 변경이 필요한 부분이 있어요.
지금 ticker를 더하는 부분에서 기존에 존재하는 ticker가 있는지 확인하고 추가하는 부분이 있는데, 이부분은 아마도 추가로 ticker를 더하는 부분을 염두하고 만드신거 같아요.
그런데 id가 auto increment가 되는것이 아니라 현재 받은 ticker의 index를 그대로 id로 넣고있습니다. 그렇게 되면 새롭게 들어갈 ticker id가 겹치게 되면서 문제가 발생합니다.
이 부분 변경 부탁드릴게요

@dongminlee94 동민님 바꾼 PR 이후로 stat 쪽이 동작을 안하네요 확인 부탁드릴게요

repo: sungho-joo/crypto-rdb


text:
异步ToPageListAsync经常：Invalid operation. The connection is closed.

[16:42:15 ERR] 查询异常
System.InvalidOperationException: Invalid operation. The connection is closed.
at SqlSugar.AdoProvider.GetDataReaderAsync(String sql, SugarParameter[] parameters)
at SqlSugar.QueryableProvider1.GetDataAsync[TResult](KeyValuePair2 sqlObj)
at SqlSugar.QueryableProvider1._ToListAsync[TResult]()    at SqlSugar.QueryableProvider1.ToPageListAsync(Int32 pageIndex, Int32 pageSize, RefAsync`1 totalNumber)
at YunMa.Dormitory.Repository.Evaluation.StudentAppraisalRepository.<>c__DisplayClass4_0.<b__0>d.MoveNext() in D:\work\code\DigitalCampus\ProjectCode\Dormitory\YunMa.Dormitory.Repository\Evaluation\StudentAppraisalRepository.cs:line 110
--- End of stack trace from previous location where exception was thrown ---
………………………………
错误异常如上！

DB不能单例

DB不能单例，对事务有影响吗？

authors: cnkker sunkaixuan

repo: sunkaixuan/SqlSugar

license_source: bigquery


text:
请问是否支持持久性sql

您好。我粗略的看了文档。
但是，想问问，是否支持持久性的sql？比如hibernate那种，使用xml（或者json）来保存sql语句。因为我们的项目的sql查询比较多。

SmartSQL，你可以参考一下！

谢谢楼上。非常有用。

有日志功能可以拿到每次执行的SQL

sunkaixuan，麻烦看看我在文档园提的问题。
有一个问题无法解决，看了http://www.codeisbug.com/Doc/8/1140，也不知道如何跟踪出sql语句。

authors: chenmfly makyo5 sunkaixuan


text:
fullscreen app window when startup

当窗口的webContents加载完成后，调用win.maximize()方法将窗口最大化

这种强制最大化不是每个人都想要的。倒是每次运行都能恢复上次退出时的窗口大小和最大化状态，是有必要的

repo: sunner/ChatALL


text:
Create and add link to README Vietnamese version

Create and add link to README Vietnamese version.

Thank you very much. The PR will be included in next release.

authors: kztera sunner


text:
mazda cx5 2023 longitudinal control is not working

Describe the bug
Custom ACC can be toggled but it doesn't seem to change the behavior of stock ACC on Mazda CX5 2023.
Also, experimental mode cannot be toggled.
Which car does this affect?
Mazda CX-5 2023
Provide a route where the issue occurs
n/a
openpilot version
0.9.2
Additional info
No response

Does this car auto-resume with stock openpilot? Experimental Mode is not supported with Custom Stock Longitudinal Control at the moment.

Please feel free to reopen the issue or reach out to us directly in the sunnypilot discord if this issue persists in the latest release-c3 branch.

repo: sunnyhaibin/sunnypilot


text:
KIA K5 2024 HEV  add fingerprint

KIA K5 2024 HEV
{'carParams': {'alternativeExperience': 1,
'autoResumeSng': True,
'carFingerprint': 'mock',
'carFw': [{'address': 1988,
'brand': 'hyundai',
'bus': 0,
'ecu': 'fwdCamera',
'fwVersion': b'\xf1\x00DL3HMFC  AT KOR LHD 1.00 1.02 99210-L2500 230911',
'logging': False,
'obdMultiplexing': True,
'request': [b'"\xf1\x00'],
'responseAddress': 1996,
'subAddress': 0},
{'address': 2000,
'brand': 'hyundai',
'bus': 0,
'ecu': 'fwdRadar',
'fwVersion': b'\xf1\x00DL3_ RDR -----      1.00 1.01 99110-L2500         ',
'logging': False,
'obdMultiplexing': True,
'request': [b'"\xf1\x00'],
'responseAddress': 2008,
'subAddress': 0}],
'carName': 'mock',
'carVin': '00000000000000000',
'centerToFront': 1.350000023841858,
'communityFeatureDEPRECATED': False,
'dashcamOnly': False,
'directAccelControlDEPRECATED': False,
'enableApgsDEPRECATED': False,
'enableBsm': False,
'enableCameraDEPRECATED': False,
'enableDsu': False,
'enableGasInterceptor': False,
'experimentalLongitudinalAvailable': False,
'fingerprintSource': 'can',
'flags': 0,
'fuzzyFingerprint': False,
'hasStockCameraDEPRECATED': False,
'isPandaBlackDEPRECATED': False,
'lateralTuning': {'pid': {'kf': 0.0}},
'longitudinalActuatorDelayLowerBound': 0.15000000596046448,
'longitudinalActuatorDelayUpperBound': 0.15000000596046448,
'longitudinalTuning': {'deadzoneBP': [0.0], 'deadzoneV': [0.0], 'kf': 1.0, 'kiBP': [0.0], 'kiV': [1.0], 'kpBP': [0.0], 'kpV': [1.0]},
'mass': 1836.0,
'maxLateralAccel': 10.0,
'maxSteeringAngleDegDEPRECATED': 0.0,
'minEnableSpeed': -1.0,
'minSpeedCanDEPRECATED': 0.0,
'minSteerSpeed': 0.0,
'networkLocation': 'fwdCamera',
'notCar': False,
'openpilotLongitudinalControl': False,
'passive': False,
'pcmCruise': True,
'radarTimeStep': 0.05000000074505806,
'radarUnavailable': False,
'rotationalInertia': 3139.534912109375,
'safetyConfigs': [{'safetyModel': 'noOutput', 'safetyParam': 0, 'safetyParam2DEPRECATED': 0, 'safetyParamDEPRECATED': 0}],
'safetyModelDEPRECATED': 'silent',
'safetyModelPassiveDEPRECATED': 'silent',
'safetyParamDEPRECATED': 0,
'startAccel': 0.0,
'startingAccelRateDEPRECATED': 0.0,
'startingState': False,
'steerActuatorDelay': 0.0,
'steerControlType': 'torque',
'steerLimitAlert': False,
'steerLimitTimer': 1.0,
'steerRateCostDEPRECATED': 0.0,
'steerRatio': 13.0,
'steerRatioRear': 0.0,
'stopAccel': -2.0,
'stoppingControl': True,
'stoppingDecelRate': 0.800000011920929,
'tireStiffnessFactor': 1.0,
'tireStiffnessFront': 201087.203125,
'tireStiffnessRear': 317877.90625,
'transmissionType': 'unknown',
'vEgoStarting': 0.5,
'vEgoStopping': 0.5,
'wheelSpeedFactor': 1.0,
'wheelbase': 2.700000047683716},
'logMonoTime': 32801700298,
'valid': True}

dongl id
065323ce3e83f24b


text:
在没有解决玄学导致卡顿的问题前，我还是不用吧😂

尝试了重新设置磁盘权限，也试过重启，电脑也死机一次，最后是卸载后重装微信才解决
刚好那个时候还需要用微信，整的我好难受😔

手贱升级了cli，坐等修复

确实，卡的有点过分了

升级到最新系统之后完全不卡了，很神奇macOS 15.0 正式版

2020年 M1 16GB 不敢在升了！！！哈哈哈哈

升级到最新系统之后完全不卡了，很神奇macOS 15.0 正式版

升了之后确实引起卡顿的几个进程没了。

卸载重新安装后设置磁盘权限后居然不卡了

authors: LiShouHai ZiPengWei chenzhwsysu57 codeOct fengzai6 ghostlitao

repo: sunnyyoung/WeChatTweak-macOS


text:
fix: using --iidfile instead of --metadata-file in buildx build

the format of the json produced by —metadata-file changes between versions of buildx
closes #34

I tested with an older buildx and it solves the problem! sunodo build working flawlessly on my machine now.

authors: felipeargento tuler

repo: sunodo/sunodo


text:
Linux-aarch64 build for authentict

Describe your pull request here

Please read the guidelines for Bioconda recipes before opening a pull request (PR).
General instructions

If this PR adds or updates a recipe, use "Add" or "Update" appropriately as the first word in its title.
New recipes not directly relevant to the biological sciences need to be submitted to the conda-forge channel instead of Bioconda.
PRs require reviews prior to being merged. Once your PR is passing tests and ready to be merged, please issue the @BiocondaBot please add label command.
Please post questions on Gitter or ping @bioconda/core in a comment.

Instructions for avoiding API, ABI, and CLI breakage issues
Conda is able to record and lock (a.k.a. pin) dependency versions used at build time of other recipes.
This way, one can avoid that expectations of a downstream recipe with regards to API, ABI, or CLI are violated by later changes in the recipe.
If not already present in the meta.yaml, make sure to specify run_exports (see here for the rationale and comprehensive explanation).
Add a run_exports section like this:
build:
  run_exports:
    - ...

with ... being one of:

Case
run_exports statement

semantic versioning
{{ pin_subpackage("myrecipe", max_pin="x") }}

semantic versioning (0.x.x)
{{ pin_subpackage("myrecipe", max_pin="x.x") }}

known breakage in minor versions
{{ pin_subpackage("myrecipe", max_pin="x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)

known breakage in patch versions
{{ pin_subpackage("myrecipe", max_pin="x.x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)

calendar versioning
{{ pin_subpackage("myrecipe", max_pin=None) }}

while replacing "myrecipe" with either name if a name|lower variable is defined in your recipe or with the lowercase name of the package in quotes.
Bot commands for PR management

Please use the following BiocondaBot commands:
Everyone has access to the following BiocondaBot commands, which can be given in a comment:

@BiocondaBot please update
Merge the master branch into a PR.

@BiocondaBot please add label
Add the please review & merge label.

@BiocondaBot please fetch artifacts
Post links to CI-built packages/containers. You can use this to test packages locally.

Note that the @BiocondaBot please merge command is now depreciated. Please just squash and merge instead.
Also, the bot watches for comments from non-members that include @bioconda/<team> and will automatically re-post them to notify the addressed <team>.


text:
Django 2.0 support

Hi,
django 2.0 is not listed among supported versions. Is this an omission, or is django 2.0 not compatible with djoser? If it's only an omission, the docs should be updated.

@piotr-szpetkowski some problems with Django 2.x:
'UserCreateView' should either include a queryset attribute, or override the get_queryset() method.
most of the views affected

@piotr-szpetkowski What about Django 2.1?

@axper it works as well. As you can see in tox.ini - we run tests against Django 2.1 too.

Can confirm, thanks for the awesome lib!

authors: axper czert dekoza ttuygun

repo: sunscrapers/djoser

license: mit


text:
share framework scheme for carthage

missed this!

Thank you Andrew!

authors: AndrewSB delba

repo: sunshinejr/RxPermission


text:
Model 705 - VRef and VRefAuto scale factor

Currently VRef and VRefAuto do not use the voltage scale factor (V_SF). Should they?

I believe they should.

I believe they should.

authors: bobfox jsbosch

repo: sunspec/models


text:
Context length exceeded. High token consumption

Environment:

Model version: GPT-4o-2024-08-06
Issue context: When importing multiple files, an error occurs indicating that the token limit has been exceeded.

Observed behavior:

Multiple interactions needed for file import:

When importing a single file, it often requires several interactions (approximately 6-7 attempts) to succeed, which significantly increases token consumption.

Large data volume during file import:

During file import, the system sends the first three rows of data. However, when the data file contains many columns, the size of the data sent is quite large, leading to high token usage and potentially exceeding the token limit.

Expected behavior:

Optimized token consumption by reducing the number of interactions and the size of the data being sent.

Thanks for the issue @ChenZixinn. Do you have any sample files you could provide to help reproduce your two observations?

Thank you for your response.
I believe I’ve temporarily resolved the issues. The first problem was related to the CSV file, where some data fields were empty, causing failures and constant retries. By formatting the CSV file—such as filling empty rows with zeros or other values—it reduced the errors.
The second problem was likely caused by the first one, and as I continuously imported the file, it resulted in a large message context. However, setting a maxMessageContext seems to resolve the issue.
I’m sorry I can’t provide the data for reference, but here are two areas for optimization:
1.	Avoiding errors during CSV imports: If there are empty rows or inconsistent data types, it’s easy for errors to occur.
2.	Reducing the logging of non-essential information or simplifying the logs to minimize token consumption.

authors: ChenZixinn gregnr

repo: supabase-community/postgres-new


text:
[Feature request]: Add Native sign in

General Info

[X] I installed the latest version of Supabase Kt
[X] I checked for similar feature requests

Feature request
It would be great if we had functions to sign in natively with Google & Apple on Android/IOS. Supabase Flutter has a function for signing in with Apple.
I'm not sure how you could implement this to be

intuitive
multiplatform (IOS/Android). Not a requirement. Google on Android, Apple on IOS would be sufficient at first.

If anyone wants to help, you are welcome to make a PR or discuss in this issue for a proposed solution!
Usecase
Easier for the user and for the developer.

Note that you can use Native Auth and then login to supabase using an ID Token. See demo for an example.

Now included in the Compose Auth plugin.

repo: supabase-community/supabase-kt


text:
Introduce new flow extension functions for postgrest

What kind of change does this PR introduce?
Feature (closes #570)
What is the current behavior?
For receiving realtime updates for your tables, you had to use a realtime channel and handle subscribing/unsubscribing yourself.
What is the new behavior?
There are two new methods PostgrestQueryBuilder#selectSingleValueAsFlow and PostgrestQueryBuilder#selectListAsFlow which handle all that channel management internally. You will just have to call these new methods:
//Not a suspending function, subscribing and unsubscribing is handled internally
supabase.from("products").selectSingleValueAsFlow(Product::id) {
    Product::id eq 2
}.collect {
    println(it)
}

supabase.from("products").selectListAsFlow(Product::id, filter = FilterOperation("id", FilterOperator.GT, 2)).collect {
    println(it)
}

@mlykotom would love to hear your thoughts!


text:
Missing GoTrue environment variables in config.toml

Is your feature request related to a problem? Please describe.
config.toml seems to be missing options for OTP expiration (seconds) and length (digits). This makes it harder to work with OTPs locally if you change the length specifically (expiration doesn't really matter).
Describe the solution you'd like
I'd like an option added like auth.email.otp_length to config.toml
Describe alternatives you've considered
None applicable.
Additional context
Possibly related discussion: https://github.com/orgs/supabase/discussions/26330
This is already adjustable in the managed studio:

But remote and local needs to match here.

+1

This has been addressed by new configs added in https://github.com/supabase/cli/pull/2810

authors: hypervisor makhil006 sweatybridge

repo: supabase/cli


text:
Breaking CI as version is out of date

Bug report
Hi,
In my CI I have a line which regenrates the types from the database and fails if it finds any differences. This makes sense.
However, if there is a mismatch between the supabase CLI version used by GitHub actions and the one you used locally to build the types, an error might be raised if the format is different.
This is fixable by upgrading the local supabase version.
>>> supabase --version
1.187.3
A new version of Supabase CLI is available: v1.187.8 (currently installed v1.187.3)
We recommend updating regularly for new features and bug fixes: https://supabase.com/docs/guides/cli/getting-started#updating-the-supabase-cli

Sure, but if I try to update with 'brew upgrade supabase`, it says that 'supabase is already to the latest version 1.187.3'.
Basically brew does not register the update, which means I am unable to push any commits to master because they all fail the CI.
The immediate fix is ensure that brew upgrade sees the latest version. Longer term it would be nice to avoid this type of breakages by making sure all the versions are updated at the same time
Note It's weird that a minor version update 1.187.3 -> 1.187.8 changes the generated types formatting, which in turns break CI (which is a check which is suggested by the supabase documentation)
⚠ We receive a lot of bug reports which have already been solved or discussed. If you are looking for help, please try these first:

Docs: https://docs.supabase.com
Discussions: https://github.com/supabase/supabase/discussions
Discord: https://discord.supabase.com

Before opening a bug report, please verify the following:
-->

[x] I confirm this is a bug with Supabase, not with my own application.
[x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:

Go to '…'
Click on '…'
Scroll down to '…'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
System information

OS: [e.g. macOS, Windows]
Browser (if applies) [e.g. chrome, safari]
Version of supabase-js: [e.g. 6.0.2]
Version of Node.js: [e.g. 10.10.0]

Additional context
Add any other context about the problem here.

Sorry about that, our release process for brew-tap was broken ytd but it's now updated.

Thanks!

authors: antonio-bluco sweatybridge


text:
Every 2nd attempt to signup, in local supabase, fails after supabase db reset

Bug report
Describe the bug
Trying to sign up for the very first new supabase user, on local, EVERY second attempt, after supabase db reset fails.
I have tried varying wait times, sleep, etc... Nothing seems to change the fact that EVERY second attempt to
signup for a new user fails.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:

supabase db reset
Signup for a new user via the API, e.g using curl

URL="http://localhost:54321/auth/v1/signup"
curl -X POST -H "Content-Type: application/json" -H "apikey: $API_KEY" -d "$DATA" "$URL"

Success
supabase db reset
try to sign up for a new user again using the SAME script
Fail {"code":500,"msg":"Database error finding user","error_id":"cb34c32b-14d1-4e7f-a636-803a70463078"}%

Expected behavior
A clear and concise description of what you expected to happen.
Logs
After first supabase db reset:
2023-01-03 21:47:24 {"component":"api","level":"info","method":"POST","msg":"request started","path":"/signup","referer":"","remote_addr":"172.21.0.1","time":"2023-01-03T19:47:24Z","timestamp":"2023-01-03T19:47:24Z"}
2023-01-03 21:47:25 {"action":"login","instance_id":"00000000-0000-0000-0000-000000000000","level":"info","login_method":"password","metering":true,"msg":"Login","time":"2023-01-03T19:47:25Z","user_id":"b242a57f-1732-475e-8f2d-87d05ed25937"}
2023-01-03 21:47:25 {"auth_event":{"action":"login","actor_id":"b242a57f-1732-475e-8f2d-87d05ed25937","actor_username":"pro@naine.fit","log_type":"account","traits":{"provider":"email"}},"component":"api","duration":104993041,"level":"info","method":"POST","msg":"request completed","path":"/signup","referer":"","remote_addr":"172.21.0.1","status":200,"time":"2023-01-03T19:47:25Z","timestamp":"2023-01-03T19:47:24Z"}

After second, failed attempt:
2023-01-03 21:48:33 {"component":"api","level":"info","method":"POST","msg":"request started","path":"/signup","referer":"","remote_addr":"172.21.0.1","time":"2023-01-03T19:48:33Z","timestamp":"2023-01-03T19:48:33Z"}
2023-01-03 21:48:33 {"component":"api","error":"error finding user: FATAL: terminating connection due to administrator command (SQLSTATE 57P01)","level":"error","method":"POST","msg":"500: Database error finding user","path":"/signup","referer":"","remote_addr":"172.21.0.1","time":"2023-01-03T19:48:33Z","timestamp":"2023-01-03T19:48:33Z"}
2023-01-03 21:48:33 {"component":"api","duration":492459,"level":"info","method":"POST","msg":"request completed","path":"/signup","referer":"","remote_addr":"172.21.0.1","status":500,"time":"2023-01-03T19:48:33Z","timestamp":"2023-01-03T19:48:33Z"}

As evident from the logs, they're not that far apart.
System information
macOS 12.3.1
"supabase": "^1.27.10",

Current workaround, for anyone wondering:
# Send the POST request
curl -X POST -H "Content-Type: application/json" -H "apikey: $API_KEY" -d "$DATA" "$URL"

# Sign up a second time, because the first time it might fail :D
curl -X POST -H "Content-Type: application/json" -H "apikey: $API_KEY" -d "$DATA" "$URL"

I have narrowed it down to here https://cs.github.com/supabase/gotrue/blob/9eda0ab2668578aa63d332514b1a8a4b088aafd5/api/invite.go#L42
as much as Is possible from just reading code.

I've been experiencing this too and I think I've found a more general problem.
When you run supabase db reset with the CLI, you will immediately see the following in the PostgREST logs:
``
FATAL:  terminating connection due to administrator command
03/Apr/2023:18:39:23 +0000: Retrying listening for notifications on the pgrst channel..
03/Apr/2023:18:39:23 +0000: Attempting to connect to the database...
03/Apr/2023:18:39:23 +0000: {"code":"PGRST000","details":"FATAL:  database "postgres" does not exist\nDETAIL:  It seems to have just been dropped or renamed.\n","hint":null,"message":"Database connection error. Retrying the connection."}
03/Apr/2023:18:39:23 +0000: Attempting to reconnect to the database in 0 seconds...
03/Apr/2023:18:39:24 +0000: {"code":"PGRST000","details":"could not connect to server: Connection refused\n\tIs the server running on host "supabase_db_supabase" (172.18.0.11) and accepting\n\tTCP/IP connections on port 5432?\n","hint":null,"message":"Database connection error. Retrying the connection."}
03/Apr/2023:18:39:24 +0000: Attempting to reconnect to the database in 1 seconds...

So, PostgREST notices straight away.

In the GoTrue logs, you'll immediately see:

i.e. nothing

The moment you try to interact the the auth API, the GoTrue logs show:

{"component":"api","level":"info","method":"GET","msg":"request started","path":"/admin/users","referer":"","remote_addr":"172.18.0.1","time":"2023-04-03T18:40:23Z","timestamp":"2023-04-03T18:40:23Z"}
{"component":"api","error":"FATAL: terminating connection due to administrator command (SQLSTATE 57P01)","level":"error","method":"GET","msg":"500: Database error finding users","path":"/admin/users","referer":"","remote_addr":"172.18.0.1","time":"2023-04-03T18:40:23Z","timestamp":"2023-04-03T18:40:23Z"}
{"component":"api","duration":3629791,"level":"info","method":"GET","msg":"request completed","path":"/admin/users","referer":"","remote_addr":"172.18.0.1","status":500,"time":"2023-04-03T18:40:23Z","timestamp":"2023-04-03T18:40:23Z"}

So, it's not until the first post-DB-reset request that GoTrue notices and returns a 500 error.
I guess it does some error recovery shortly after that because subsequent requests work fine.

I think @huntedman has seen a specific instance of this; I was also seeing this and then I added a call to the admin APIto get a list of users (which is what you see above) and figured out what was going on.

Hmm seems like when the db is reset, the existing db connections in gotrue are stale and when reused, it leads to this error. A possible solution would be to also reset gotrue after the db has been reset. I'm transferring this to the CLI team so that @sweatybridge and @soedirgo can take a look.

authors: dancrumb huntedman kangmingtay

repo: supabase/gotrue


text:
pg_graphql not returning via API in Supabase

Describe the bug
Not sure if this is a Supabase issue, or an issue with this extension - feel free to move... I can no longer access GraphQL requests in Supbase outside of the .resolve() method in SQL (i.e via an IDE like Postman or Altair).
All I get when I run an introspection query is heartbeat - whereas I can query multiple entities using resolve()... any ideas?
To Reproduce
Steps to reproduce the behavior:

Create a new Supabase project
Create a table
Run a GQL query

Via SQL:
select graphql.resolve($$
    {
      usersCollection(first: 1) {
        edges {
          node {
            id
            email
          }
        }
      }
    }
$$);

{"data":{"usersCollection":{"edges":[{"node":{"id":"e2fdd949-11d5-4325-9c6f-4b6071f779a5","email":"xxxx@gmail.com"}}]}}}

VIA API:
{
  usersCollection(first: 1) {
    edges {
      node {
        id
        email
      }
    }
  }
}

{
  "data": null,
  "errors": [
    {
      "message": "Unknown field 'usersCollection' on type 'Query'"
    }
  ]
}

Expected behavior
The API returns the same data as the SQL.
Versions:

pg_graphql commit ref: 0.3.1

Additional context
Add any other context about the problem here.

The error message from the API suggests that everything is talking together correctly
{
  "data": null,
  "errors": [
    {
      "message": "Unknown field 'usersCollection' on type 'Query'"
    }
  ]
}

and getting a correct response out of graphql.resolve means that we don't have a schema cache issue.
Are you sending requests to the API as the anon role? If so, does that role have access to the users table?

Sorry @olirice, we've got two threads going on here - project ref is areluzjrtslwlywijsur.
I am indeed using the anon role. But all I get in the introspection query is the heartbeat query. I created a Random table - but there is no Random reference in the introspection either.
Looks like there are two similar reports on the Discord too.

Similar Discord issues:

https://discord.com/channels/839993398554656828/843999948717555735/976460596574822411
https://discord.com/channels/839993398554656828/843999948717555735/971795935153758280

perfect, thanks
Security in pg_graphql is controlled by postgres roles, just like the postgrest API
When using the supabase dashboard, your queries are executed as a superuser. That gives you permission to see every table/column so the graphql query returns a result.
When querying through the API, the query is executed using the requester's role, which will be anon or authenticated depending on if the user is logged in or not.
Currently, anon and authenticated have not been granted permission to select from the Random  table
select
	pg_catalog.has_table_privilege('anon', 'public."Random"', 'SELECT'),          -- false
	pg_catalog.has_table_privilege('authenticated', 'public."Random"', 'SELECT'), -- false
	pg_catalog.has_table_privilege('postgres', 'public."Random"', 'SELECT'),      -- false
	pg_catalog.has_table_privilege('supabase_admin', 'public."Random"', 'SELECT') -- true

If you grant access to the anon user:
grant select on public."Random" to anon;

you'll see it render in introspection and will be able to resolve the query
Ref:
https://supabase.github.io/pg_graphql/security/

It looks like the public schema is not on the search path for the roles anon and authenticated. That search path determines visibility of entities over the API for GraphQL and REST
You can see that by executing the following from the dashboard
select current_schemas(false) -- {public,auth,extensions}

and then as the anon role
begin;
	set role=anon; -- or authenticated
	select current_schemas(false) -- {auth,extensions}
rollback;

to resolve that make sure your Schema and Extra Search Path API settings look like this

Apologies, on mobile here. But our settings look exactly the same?
I'm fairly new to Supabase and haven't changed them. Could something else be wrong?

@steve-chavez could you please take a look at the previous 2 messages.
Do you have any ideas how the search_path could fail to include public given those settings on the dashboard?

@joesaunderson To confirm public is not being included in the search_path,  try running the following through rpc:
create or replace function show_schemas() returns name[] as $$
  select current_schemas(false);
$$ language sql;

@joesaunderson
the anon and authenticated roles do not have usage permission on the public schema
select
    pg_catalog.has_schema_privilege('anon', 'public', 'USAGE'),         -- false
    pg_catalog.has_schema_privilege('authenticated', 'public', 'USAGE') --false

On newly created projects, both roles have usage permission on public so take a look through you migration files and double check if any of them altering perms
You can resolve the issue by granting usage on public to anon and authenticated. I tested it to confirm
-- Resolves the permissions issue
grant usage on schema public to anon;
grant usage on schema public to authenticated;

-- Verify that anon can select from `organization`
begin;
    set role=anon;

    select graphql.resolve($$
    {
      organizationCollection(first: 1) {
        edges {
          node {
            id
          }
        }
      }
    }
    $$); -- {"data": {"organizationCollection": {"edges": []}}}
rollback;

please lmk if that works for you once you've had a chance to test it out

closing due to inactivity

For anyone who stumbles here... it's very likely that if you've just set up your supabase, and you've got RLS enabled, there are probably no policies assigned to your db.

Adding a couple of basic policies will get you started.

Just a tip: if you're encountering this issue and working with column-grained privileges, don't forget to grant select permission on the column containing the foreign key. 🤓

@joesaunderson
the anon and authenticated roles do not have usage permission on the public schema
select
    pg_catalog.has_schema_privilege('anon', 'public', 'USAGE'),         -- false
    pg_catalog.has_schema_privilege('authenticated', 'public', 'USAGE') -- false

On newly created projects, both roles have usage permission on public so take a look through you migration files and double check if any of them altering perms
You can resolve the issue by granting usage on public to anon and authenticated. I tested it to confirm
-- Resolves the permissions issue
grant usage on schema public to anon;
grant usage on schema public to authenticated;

-- Verify that anon can select from `organization`
begin;
    set role=anon;

    select graphql.resolve($$
    {
      organizationCollection(first: 1) {
        edges {
          node {
            id
          }
        }
      }
    }
    $$); -- {"data": {"organizationCollection": {"edges": []}}}
rollback;

please lmk if that works for you once you've had a chance to test it out

I had dropped the public schema and the first two lines worked for me.

authors: brandonscript codespearhead joesaunderson olirice rlataguerra steve-chavez


text:
add pg_idkit extension

Feature request
Additional context
Based on supabase blog post, would be nice having this extension in the docker image

Secondeding this request—bit of a bait-and-switch to recommend this in a blog post but not support it!
Nonetheless, really appreciate what this team has built.

The bar for adding new extensions to the platform is very high. In pg_idkit's case, we're instead pushing for adopting the functionality via a trusted language extension to put the control in users' hands. We're developing tooling to make that process smoother but in the short term you can copy the implementations of gen_random_uuidv6 or gen_random_uuidv7 from here for use in your projects
That project is also available on dbdev

authors: gperdomor iveshenry18 olirice

repo: supabase/postgres

license: PostgreSQL


text:
Chore/docker ci

Addresses #109. A Docker image will be built and pushed over to Dockerhub every time there is a change to the docker.vars.json file in the develop branch. Successful deployment can be found here.

Will squash the commits as well since most them were to test the GA


text:
chore(dependencies): Update dependencies

Blocked on https://github.com/facebook/docusaurus/issues/5863

Keeping in draft until the new release of Docusaurus.

This got a bit stale, I've updated it with new dependencies.

Nevermind, looks like there's some issue with MDX...

repo: superfaceai/docs


text:
WIP: feat: Very rough first draft of event system

Description
This is the event system that will be used to observe and intercept lifecycle events

Motivation and Context

We need an event system to handle stuff like sending metrics or request retrying
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] I have updated the documentation accordingly. If you are changing code related to user secrets you need to really make sure that security documentation is correct.
[x] I have read the CONTRIBUTION_GUIDE document.
[x] I haven't repeated the code. (DRY)
[ ] I have added tests to cover my changes.
[x] All new and existing tests passed.

you're probably right on the hook resolution and the 'on' hook

Eh, I didn't want to approve, just comment

repo: superfaceai/one-sdk-js


text:
🛑 Jacksons Moving, LLC is down

In a52a7e7, Jacksons Moving, LLC (https://www.jacksonsmovingllc.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Jacksons Moving, LLC is back up in ba0d5bd.

repo: superwebpros/uptime


text:
New release?

Hi,
Can you publish the recent commits? I'd rather not reference #master in my package.json.
Thanks!

Definitely, sorry for that. Should have been published a while ago. Now published on npm as 1.7.0!

Thanks!
On Nov 6, 2016 9:16 AM, "ismay" notifications@github.com wrote:

Definitely, sorry for that. Should have been published a while ago. Now
published on npm as 1.7.0!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/superwolff/metalsmith-layouts/issues/113#issuecomment-258683552,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJLoolXOHz5CEg6n0CoVpnKXcqvw3adks5q7eFOgaJpZM4Kqaxp
.

authors: ismay mikestopcontinues

repo: superwolff/metalsmith-layouts


text:
视频列表内暂停无效

在el-table中，把video-player 放在el-popover使用，通过el-popover的显示和隐藏控制video的播放和暂停。
问题描述
1、问题在show中播放视频，和展示的视频不一直。
2、如果通过预览打开视频，在hide时候，视频仍在播放没有停止。
代码如下：

<el-popover
placement="top"
width="640"
trigger="click"
@show="popShowBefore(scope.row.userId)"
@hide="popHideAfter(scope.row.userId)"
>

click 激活

业务问题需要通过业务逻辑解决。

通过控制 popover 弹出层来控制组件的生命周期（mount & unmount）
手动调用 videojs 实例来控制播放与视频切换

repo: surmon-china/videojs-player


text:
Draft: Fix return types of some Surreal methods

Change some return types from List[Dict, Any] to Unions[Dict[str, Any], List[Dict, Any]], or the Optional[...], variant of that.
What is the motivation?
Fix the currently incomplete/wrong return type annotations of some Surreal (WS/RPC client) methods.
Improving developer experience of users.
Type of Change

[ ] 📚 Examples / docs / tutorials / dependencies update
[X] 🔧 Bug fix (non-breaking change which fixes an issue)
[ ] 🥂 Improvement (non-breaking change which improves an existing feature)
[ ] 🚀 New feature (non-breaking change which adds functionality)
[ ] 💥 Breaking change (fix or feature that would cause existing functionality to change)
[ ] 🔐 Security fix

What does this change do?
Changes the return type of some methods from List[Dict[str, Any]] to

Union[Dict[str, Any], List[Dict[str, Any]]] for create, update, and merge
Optional[Union[Dict[str, Any], List[Dict[str, Any]]]] for select and delete

What is your testing strategy?
mypy returned OK
pre-commit returned OK
./scripts/run_tests.sh returned OK
Is this related to any issues?
Yes: https://github.com/surrealdb/surrealdb.py/issues/97
This PR is regarding the first "1." propose solution in the above referenced issue.
Have you read the Contributing Guidelines?

[X] I have read the Contributing Guidelines

@Wouterkoorn thanks for this PR, I will work on the conflicts and get this merged. Sorry for the late reply as I have been working on some other areas.

Closing this pull-request as the latest codebase has now been significantly updated, now making use of a native Python with binary communication with remote databases, and support for embedded database usage. The native Python library now has support for custom types, including datetimes, durations, decimals, geojson types, Record IDs, ranges, and tables 🎉.

authors: Wouterkoorn maxwellflitton tobiemh


text:
How to set a matrix radio button value from a trigger based on a previously answered question in same matrix

Are you requesting a feature, reporting a bug or ask a question?
How to set a question matrix radio button value from a trigger based on a previously answered question in same matrix?
What is the current behavior?
What is the expected behavior?
How would you reproduce the current behavior (if this is a bug)?
Provide the test code and the tested page URL (if applicable)
Tested page URL:
Test code
your_code_here

Specify your

browser:
browser version:
surveyjs platform (angular or react or jquery or knockout or vue):
surveyjs version:

Will it work on only matrix questions? I have not used matrixdynamic.
On Fri, Sep 8, 2017 at 5:00 PM, Andrew notifications@github.com wrote:

@syash2015 https://github.com/syash2015 Unfortunately trigger doesn't
work on the matrix row level. You have to use survey.onMatrixCellValueChanged
event
https://www.surveyjs.io/Documentation/Library/?id=surveymodel#onMatrixCellValueChanged
Thank you,
Andrew
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/surveyjs/surveyjs/issues/639#issuecomment-328079428,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZkUZ7qIe-5g5ZKaaLUfVX72I6ckpCjOks5sgSVYgaJpZM4PRDKr
.

--
Thanks & Regards,
Syed Asad Hasan
Tech/Team Lead
Logicsoft International Pvt. Ltd.
Email- asad_hasan@lsipl.com asad_hasan@lsipl.com
Mobile -* +91-9818963572*

@syash2015 It works for matrix dynamic and matrix dropdown questions

Ok. Then I have to change question from matrix to radiogroup.
Can I have radio buttons in the same line as question just like matrix?
On Fri, Sep 8, 2017 at 6:28 PM, Andrew notifications@github.com wrote:

@syash2015 https://github.com/syash2015 It works for matrix dynamic and
matrix dropdown questions
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/surveyjs/surveyjs/issues/639#issuecomment-328096354,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZkUZxTeoW41l-InBGRxW8WJbI15pmyQks5sgToHgaJpZM4PRDKr
.

--
Thanks & Regards,
Syed Asad Hasan
Tech/Team Lead
Logicsoft International Pvt. Ltd.
Email- asad_hasan@lsipl.com asad_hasan@lsipl.com
Mobile -* +91-9818963572*

@syash2015 Sorry, I have missed the question.
You have to set startWithNewLine property to false.
For radiogroup question you may set colCount to 0 to have all buttons on the same line
And finally, set titleLocation property to "left".
Thank you,
Andrew

repo: surveyjs/surveyjs


text:
Cannot set requiredText to an empty string anymore?

What is the current behavior?
We have all questions as mandatory and thus the asterisk is not necessary but visually annoying. Formerly it was possible to set the property requiredText="".
What is the expected behavior?
As soon as I set requiredText="" then it's restored to requiredText="*".
It would be great if you can consider to bring back this simple feature. Thanks!

@sco2tbold I do not do it on purpose. I am rewritting the way we are working with properties and sending notification on properties changing. If the value is empty it returns the default value. Right now the library deals with empty string as underfined property value. I will change it.
I will fix this issue. As a workaround you may set survey.questionTitleTemplate = "{no}. {title}:";
Thank you,
Andrew

@sco2tbold The fix will be available in the next release.
Thank you,
Andrew


text:
Uncaught ReferenceError: process is not defined     at getFingerprint2

I installed this package in My React App and also set my SECURE_LOCAL_STORAGE_HASH_KEY in my .env file but once I call the "import" line, I get the error below. Please any solution to this. I even downgraded to version 1.0.18 still the error persisted. I used Vite to create the React App.
Uncaught ReferenceError: process is not defined
at getFingerprint2 (fingerprint.js:23:8)
at new EncryptionService2 (encryption.js:33:39)
at getAllLocalStorageItems2 (localStorageHelpers.js:32:19)
at new SecureLocalStorage2 (index.js:57:56)
at node_modules/react-secure-storage/dist/index.js (index.js:117:26)
at __require2 (chunk-BHN6OJC3.js?v=c31a19ab:15:50)
at index.js:119:19

Hi @tboy44wiz Can you please provide the Node, NPM and react version which you are using and the command you have run to create the app,

npm version =  8.15.0
node version = 16.17.0

Hi @tboy44wiz Can you please provide the Node, NPM and react version which you are using and the command you have run to create the app,

npm version = 8.15.0
node version = 16.17.0

Do you mind if I contribute to the fixing?

@tboy44wiz You can contribute, and I got engaged with few other work, it might take same time for me to take a look
Please make sure to create a new branch called dev/*** and create a PR, also before creating the PR just run yarn build:lib or npm run build:lib to build the files

@tboy44wiz Can you please provide your react-scripts version and if you are using webpack, then webpack version too?
To solve the "Uncaught ReferenceError: process is not defined" in React, open your terminal in your project's root directory and update the version of your react-scripts package by running npm install react-scripts@latest and re-install your dependencies if necessary.
https://bobbyhadz.com/blog/react-referenceerror-process-not-defined

repo: sushinpv/react-secure-storage


text:
Make pod_total_* metrics persistent/survive a Kepler restart

A clear and concise description of what the problem is.
The pod_total_* metrics represent the total accumulated over all sample since Kepler started monitoring the particular pod. When restarting the Kepler pods this value goes back to zero.
Describe the solution you'd like
Metrics for pod_total_* should persist/survive a reboot of the Kepler Pod.
Describe alternatives you've considered
From Prometheus perspective I can do something like sum(pod_curr_energy_in_core_millijoule{pod_name='my-pod'}) to get an approximate total as seen by Prometheus. Kepler samples every 3 secs and prometheus has its own scrape schedule. For this reason, not all the samples might be scraped by prometheus so the total seen by the sum query can be different from the actual total.

I would think this requires at three changes:

A CLI flag to load and persist metrics
Functions that allow Kepler to load the last metrics upon start and persist the stats before exit
A persistent volume for Kepler

maybe need a way to clean up those metrics as well ? as the metrics might be really big ..
also ,seems it's either true/false means we should collect all pods metrics which might be inefficient
so design might think about how to just focus on individual pod though it can be long term thing

This is a good topic!
Prometheus and Grafana have the logic to enable persistent storage....
So we should also make this configurable...
The challenge here is how do we save data to persistent storage?
Maybe we need a database?

@marceloamaral a plain json on a persistent volume?

Right, so we could keep it on memory and dump to file each X minutes....

so something like following:
mount a volume (eph or nfs etc) at start of kepler to a desired place
every 3 sec update the pod_total_x then write to the file (should be not that heavy operation?)
load the file during startup if exist and init the pod_total_x with the file?

it might have sense to fetch the last "total" metric from of a suitable node (if present) directly from Prometheus when starting kepler's pod, but as mentioned - the numbers would get high very fast and honestly is there even a reason to export "total" metrics?

In fact, we might not need the persistent volume for that!
Prometheus does a very good job of handling cases where a counter has been reset:
https://prometheus.io/docs/prometheus/latest/querying/functions/#rate
So if Kepler restarts (which should be very rare) it shouldn't be a big problem from Prometheus' point of view.
Unless there is a problem with the cluster and Kepler restarts too often...But it will affect everything...

honestly is there a reason to export "total" metrics?

There are some mentions in the prometheus official documentation guideline for this.
Counters are useful for accumulating the number of events or the amount of something in each event.

Gauges are useful for snapshots of state such as requests in progress, free/total memory, or temperature.

The Prometheus guideline also says:
For base unit Power:
Prefer to export a joule counter, so rate(joules[5m]) gives you power in Watts.

We could export power with a gauge, but exporting energy with counter has some advantages:

a counter will not miss any events, as prometheus failed to scrape a metric. It will accumulate in the next interval
using the meter will force more approximations in the calculation of energy consumption. For example, if we export power, we need to divide the energy by the kepler collection interval. So it will be another average...
CPU utilization is measured with a counter, e.g., container_cpu_usage_seconds_total

Can we close this issue?

authors: Feelas jichenjc marceloamaral rootfs williamcaban

repo: sustainable-computing-io/kepler


text:
Add support to deploy Kepler in a cluster in development mode

Why we need this PR:
When extending Kepler, the developer needs an easy way to build and deploy Kepler in its cluster.
What this PR does:
This PR adds support to:

build a docker image with custom container registry and tag using environment variables
push the new image to the container registry
generate the manifests using the custom image
clean up the cluster (undeploy kepler)
deploy kepler to the given cluster

Testing kepler will be as simple as running make cluster-sync
Special notes for your reviewer:
This is the typical workflow in other k8s bases systems

thank you @marceloamaral

This is great! @marceloamaral! I will have to test this.

authors: eklee15 marceloamaral rootfs


text:
allow for reading until EOF with the function ParseUntilEOF

The -new- PR for this from another branch.
This fix allows reading until EOF, without providing "bytesToRead", it keeps the previous Parse signature for backwards compatibility and creates a new ParseUntilEOF function which doesn't require the extra param.

can you check out the changes I made and pull this PR into the code?

ok, I added your changes and removed the additional const in parse.go

Thank you! Can you take a look at this comment when you get a chance? https://github.com/suyashkumar/dicom/pull/273/files#r1183167194 I can also send a PR to your branch to do it if easier!

can you approve this PR?

great work @amitbet !
I was just searching for this change :heart:

authors: amitbet bench suyashkumar

repo: suyashkumar/dicom


text:
Weird behaviour during comparision of values

@svanoort
Hi There,
I faced with weird behaviour when I tried co compare two values. The testset:
- config:
   - testset: "User related default tests"
   - generators:
        - "id": {'type': "random_text", 'length': "20", 'character_set': "alphanumeric"}

- test:
   - name: "login"
   - group: "cust_login"
   - url: "/authenticate/login"
   - method: "POST"
   - headers: {template: {'Authorization': 'Basic ABCDEFG=='}}
   - expected_status: [201]
   - extract_binds:
       - "token": {"jsonpath_mini": "session_id"}

- test:
   - name: "user list"
   - group: "user_list"
   - url: "/users/list/"
   - method: "GET"
   - headers: {template: {'Authorization': "OAuth $token"}}
   - expected_status: [200]
   - extract_binds:
       - "totalnums": {"jsonpath_mini": "total_num"}
       - "name": {"jmespath": "users[0].username"}

{ more tests here (user creation) }

- test:
   - name: "user list"
   - group: "user_list"
   - url: "/users/list/"
   - method: "GET"
   - headers: {template: {'Authorization': "OAuth $token"}}
   - expected_status: [200]
   - validators:
       - compare: {jsonpath_mini: "total_num", comparator: "gt", expected: {template: "$totalnums"}}

{ more tests here (user deletion) }

- test:
   - name: "user list"
   - group: "user_list"
   - url: "/users/list/"
   - method: "GET"
   - headers: {template: {'Authorization': "OAuth $token"}}
   - expected_status: [200]
   - validators:
       - compare: {jsonpath_mini: "total_num", comparator: "eq", expected: {template: "$totalnums"}}

The first comparation's result:
ERROR:Test Failure, failure type: Validator Failed, Reason: Comparison failed, evaluating gt(8, 7) returned False
And the second comparision's result:
ERROR:Test Failure, failure type: Validator Failed, Reason: Comparison failed, evaluating eq(7, 7) returned False
I am not sure why get False if 8 grater than 7 and 7 equal with 7? (These data are from same field, which means these are same type)
Thanks in advance!

Hi @oursinyi,
you can create a custom_comparators.py and use with --import_extensions "custom_comparators"
COMPARATORS = {
    'int_lt': lambda a, b: int(a) < int(b),
    'int_gt': lambda a, b: int(a) > int(b),
    'int_eq': lambda a, b: int(a) == int(b)
}

Now you can comapre json data and template variable as integer.
 - compare: {jsonpath_mini: "total_num", comparator: "int_gt", expected: {template: "$totalnums"}}

authors: kovacsbalu oursinyi

repo: svanoort/pyresttest


text:
read() does not support filename with space on macOS

Describe the bug
If the filename includes  , the read modules fails to read the file.
// +server.ts

import space from './Lorem ipsum.txt';
import underscore from './Lorem_ipsum.txt';

export const GET = () => read(space); // does not work in macOS
export const GET = () => read(underscore); // works as expected

Reproduction

space

// src/routes/space/+server.ts

import { read } from '$app/server';
import text from './Lorem ipsum.txt';

export const GET = () => read(text);

src/routes/space/Lorem ipsum.txt

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

Logs
Error: Asset does not exist: src/routes/space/Lorem%20ipsum.txt at Module.read

System Info
System:
  OS: macOS 14.5
  CPU: (10) arm64 Apple M1 Pro
  Memory: 89.27 MB / 16.00 GB
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 20.13.1 - ~/Library/Caches/fnm_multishells/23392_1716895447272/bin/node
  npm: 10.5.2 - ~/Library/Caches/fnm_multishells/23392_1716895447272/bin/npm
  pnpm: 9.1.3 - ~/Library/Caches/fnm_multishells/23392_1716895447272/bin/pnpm
Browsers:
  Chrome: 125.0.6422.78
  Edge: 125.0.2535.67
  Safari: 17.5
npmPackages:
  @sveltejs/adapter-node: ^5.0.1 => 5.0.1
  @sveltejs/kit: ^2.0.0 => 2.5.10
  @sveltejs/vite-plugin-svelte: ^3.0.0 => 3.1.0
  svelte: ^4.2.7 => 4.2.17
  vite: ^5.0.3 => 5.2.11

Severity
serious, but I can work around it
Additional Information
Was not able to reproduce on StackBlitz.

Does this issue happen in dev mode? in prod builds with specific adapters?

It occurs on macOS + Vite dev mode + Node.js adapter.
Haven't checked on other environments.

authors: Conduitry hyunbinseo

repo: sveltejs/kit


text:
A way to detect module load failure.

Currently, navigating to a route when the route’s module is no longer available results on a 500 with the default error created by v8 (or the browser?).  This makes it hard to accurately detect module load failures in the load function for __error.svelte since browsers will show different error messages (and checking for a string isn’t really reliable anyway).
Describe the solution you'd like
An extra property passed to load, like moduleError boolean, or even attaching an extra property to the returned error.
Describe alternatives you've considered
Reading the error message but it’s up to the browser to chose that message (or v8?). In my use case, Desktop Chrome and iOS browser show different errors.
How important is this feature to you?
Pretty important, and should be straight forward to implement.
Additional context
Upon a new build, old build files get deleted in my case, so being on the app during a new build results in module load failures (well, they are gone). A flag like the suggested one makes it easy to determine when to show a message to the user asking to reload the page (or force reload or whatever). A service worker can solve this issue but I feel it should be part of kit.

More context - it gets ugly (I've actually got it all in a try catch block in my use case because there's no guarantee the error will have a message, that the message will be a string etc).
<script context="module">
	export async function load({ error, status }) {
		return { props: { errorMessage: error.message, status } };
	}
</script>

<script>
	export let errorMessage, status;

	$: moduleLoadFailed =
		status === 500 &&
		(errorMessage.toLowerCase().includes('failed to fetch dynamically imported module') ||
			errorMessage.toLowerCase().includes('importing a module script failed'));
</script>

{#if moduleLoadFailed}
	Error loading module, please refresh
{:else}
	Other error
{/if}

Possibly related (maybe a superset of this issue): #1857

Checked that out like an hour ago and it doesn't really have anything to do with it - but definitely another error reporting improvement. Error handling over all should be more descriptive.

Though now that I looked at the error handling label, seems like this is a duplicate of https://github.com/sveltejs/kit/issues/1678

Good find, thanks. Closing as duplicate of #1678

authors: andreivreja dummdidumm


text:
REPL integration

Watching Ron Au's (amazing) Svelte Summit talk reminded me that we need to integrate the REPL with Svelte Kit, since it's currently based on the hopefully-soon-to-be-deprecated sveltejs/template

Going to close this as discussion around the next version of the REPL is happening elsewhere (albeit slowly, and not in public yet). In all likelihood we'll be using CodeMirror 6 rather than Monaco, but we're definitely aware of those features and it would be great to include them.


text:
Components are rendered twice within sveltekit.head

Describe the bug
I have a component Meta.svelte which is rendered within +layout.svelte. On page load (and SSR) the tags are rendered correctly, but on JS page navigation the tags are duplicated (which in Chrome means the second <title> is ignored)
<svelte:head>
	<Meta />
</svelte:head>

<script>
	import { page } from '$app/stores';

	let title;
	let description;

	$: {
		$page;
		title = Math.random();
		description = Math.random();
	}
</script>

<title>{title}</title>
<meta name="description" content={description} />

Reproduction
Made a demo app
https://github.com/aubergene/svelte-kit-head-bug
Logs
No response
System Info
System:
    OS: macOS 12.5.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 126.55 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
  Browsers:
    Chrome: 104.0.5112.101
    Firefox: 92.0
    Safari: 15.6.1
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.65
    @sveltejs/kit: next => 1.0.0-next.431
    svelte: ^3.44.0 => 3.49.0
    vite: ^3.0.4 => 3.0.9

Severity
serious, but I can work around it
Additional Information
No response

Sorry, further investigation, it might be this https://github.com/sveltejs/svelte/pull/7745 will test

Also seems related to https://github.com/sveltejs/svelte/issues/6463

In my trivial test repo, it appends on hydrate and then continues to update the second set of DOM elements. However in the real big hairy project I'm working on it appends the entire component output each time, but I haven't yet worked out how to reproduce that behaviour

I'm going to close this as a duplicate of the bugs in the Svelte repo

authors: aubergene benmccann


text:
Treat layout pages like components when using named slots

Let's say I have a _layout.svelte like the following:
<slot name="layout-pre"></slot>

Some other intermediate stuff.

<slot></slot>

And now I have a child view (let's call it homepage.svelte which inherits that layout, which puts some stuff into the named slot, and the rest into the default slot:

This should come before #intermediate.

Since this doesn't use a named slot, it'll just get inserted into the unnamed slot above.

Right now this is not allowed, and the following error is thrown: Element with a slot='...' attribute must be a descendant of a component or custom element. Are there technical or usage reasons why we wouldn't want to treat a layout like any other component with respect to slots?

Bit late to the discussion and it looks like this issue was originally from Sapper, but I've found some good uses for named slots in layouts with Svelte/kit.
For instance, let's image a long blog post with a table of contents sidebar. It would be really helpful if the main contents is the default slot and the sidebar is a named slot. This would make development really easy! But let's imagine a more complex scenario because on mobile sites, this sidebar should disappear and potentially be replaced with a hamburger menu in the menu. Using named slots, this is easy as you can define the name in the $layout.svelte. But without it, every page needs to implement the header as well. This may be a contrived example, but the point stands.
Other's earlier in this thread have suggested you can just create a Layout component, import that onto your page, and then use named slots with that. But…

Doesn't that defeat the purpose of using a $layout.svelte?
This will impact performance as everything will get redownloaded and rerendered on page navigation
Destroys all state that could be shared between pages

For instance, the YouTube search bar's value persists between page changes

If your site uses multiple layouts, that means also maintaining multiple layout components and multiple layout pages (if any part of the layout is static)

I agree, without this feature any dynamic sidebar becoming a disaster.

I have the same issue.
My web site is divided in three parts : header, rest, footer.
Logically, header and footer would go in layout and rest would go in each in each page and be rendered in the layout by .
However, on mobile devices, I want header and part of the rest to have the height of the viewport. So I would need to have two different slots like so:

    <MainHeader />

    <slot ="top_slot"/>

    <slot />

  <MainFooter />

I agree with this request.  It would create a lot more flexibility on the layout.  I expected it to work out of the box.  I'm wrapping code in "Layout" components but it does add some boilerplate.  I'm using it for adding things like modals, app status messages, notifications, etc.
@Nick-Mazuk I have the same concern specifically about re-rendering on page navigation when using these "Layout" components.  I think the named slots in the layout would definitely eliminate the need to create as many additional layouts templates.
@martinjeromelouis it definitely seems like there would be some benefits when dealing with mobile.  I haven't gotten that far in my app yet but I'm definitely going to use slots when I get to that point.

This makes you loose lots of performance as this forces full rerenders which is super annoying.

In the pseudocode snippet below I demonstrate how I get around this problem in my project.

{ #if slots.navigator }
	<svelte:component this={slots.navigator}></svelte:component>
{/if}

{ #if slots.sidemenu }
	<svelte:component this={slots.navigator}></svelte:component>
{/if}

This approach is fully SSR compatible and does not produce flashes of content. There are limitations though of course.
_Note that Vite currently isn't able to properly parse template literals that also use aliases like $lib. They will simply not work. So clever dynamic paths for your import() like $root/routes${page.path}/_Navigator.svelte are going to be difficult to pull of, but not impossible.

Any updates on this? This is still quite the annoyance.

Still hoping and waiting for this to work. Is this issue on the roadmap or is it not likely to happen?

Still hoping and waiting for this to work. Is this issue on the roadmap or is it not likely to happen?

it is not likey to happen.

In my opinion svelte has some nice ideas but in too many places its inventing too much new syntax. I think e.g. lit does a much better job at the syntax place as it's able to run without any transformation.

lit does a much better job at the syntax place as it's able to run without any transformation.

and how lit solve such specific issue? Please, talk about this topic only.

lit does a much better job at the syntax place as it's able to run without any transformation.

and how lit solve such specific issue? Please, talk about this topic only.

It does not use a custom syntax for routing but just normal components. Therefore all features of normal components still work. I remember working around this issue here by wrapping my pages in a component if I'm not misremembering.

Iit does not use a custom syntax for routing but just normal components.

we also have no custom syntax, __layout is a common svelte component

Iit does not use a custom syntax for routing but just normal components.

we also have no custom syntax, __layout is a common svelte component

I'm not using svelte any more but I believe that according to https://svelte.dev/docs#template-syntax-slot the pages should have a wrapper like (copying the example in the first comment of this issue)
<layout>

This should come before #intermediate.

  Since this doesn't use a named slot, it'll just get inserted into the unnamed slot above.
</layout>

Therefore I believe svelte pages are not normal components.

Therefore I believe svelte pages are not normal components.

it's a normal component, but putting an actual page into this slot is done by Kit itself and you have no control over it.
Basically, Kit makes rendering twice, one for layout and the second for page but the layout and page it's common and normal components.
To solve this issue we should extend interface between layout component and page component.

This is kinda a bummer honestly.
I have a navigation, some content and a footer. I want to be able to set the title of the current page (which is defined in the actual page, e.g. about.svelte, inside <svelte:head><title>...</title></svelte:head>) inside the navigation component and of course the contents of the page.
Now I do imagine I could work around this problem by using a store of some sort and have the navigation two-way-bind to e.g. currentPage#title or something, but that would also mean I have to ensure my about.svelte page writes the title into the store when being loaded?
It'd be much easier if I could somehow specify the target slot inside the layout with the default __layout.svelte file - instead of replacing it.
This actually is so much of an issue, that I feel discouraged working with Svelte any further (for the time being). Thus I will revisit Svelte(Kit) once there's a way to do this. I sort-of wished, that there was no layout-magic happening at all and that the pages and the layout were all just individual components, that have slots, that I can individually address.

I have a project that looks something like the following
src/
  __layout
  map/
    new.svelte
    [id]/
      index.svelte
      edit.svelte
  user/
    [id].svelte
  account.svelte
  forgot-password.svelte
  home.svelte
  index.svelte
  privacy.svelte
  signin.svelte
  signup.svelte
  terms.svelte

My authenticated and unauthenticated layouts vary quite a bit but the ideal directory structure doesn't offer a clear cut way to override/reset the main layout template without a lot of duplication.
These pages would use the unauthenticated layout: forgot password, index, privacy, signin, signup, terms. The rest would use an authenticated layout.
I hoped that by having one __layout.svelte file with a named slot and an if statement I can do this in a pretty straightforward way.
// __layout.svelte
{#if $$slots.unauthenticated}
  // layout for public pages
  <slot name="unauthenticated" />
{:else}
  // layout for authenticated pages
  <slot />
{/if}

// terms.svelte

  // public, terms and conditions content

Is this the wrong way to think about layouts? Is this in line with what folks in this issue have been requesting or am I misunderstanding something? If I am, it would be lovely to have support for this to make the layout file setup a lot simpler!

@wfendler your edit is what I ended up doing. It's lame and feels like a hack, but it does work pretty well.

Just looking over some older issues, we had a need to do this too.
I solved it using a few different techniques. We use context (just because it's available), although not a requirement. The context is a writable store. In the store we bind to an html element/DOM node. Then we use a "portal" to project content into the html element/DOM node.
This REPL doesn't use sveltekit (yet) (for obvious reasons), but you could easily see how switching from one page to another could be accomplished with routing and the routed components would project whatever they need to into the targeted html element.
REPL example
Obviously this has tremendous downsides, namely relying on an action, thus not being able to be rendered server side. There is quite a bit of setup involved also, but once its setup, things could easily be componentised to ease the boiler-plate.
Explanation without looking at the REPL:

Now you are able to target this specific DOM node and append whatever you want to it, like this:
<Portal target={$context.navigation}>
  Navigation from some component

      Users

</Portal>

Hey @benmccann, any plans for this?

Hey @benmccann, any plans for this?

You are free to send a PR. Please don't ping on issues asking for updates as all it does is distract people from getting stuff done. You can put a thumbs up on an issue if you'd like to indicate support

It's a very fundamental issue. It will be better if somebody from the core can describe direction, and after we can probably make a PR.

How much work will be needed if we just add a new <sveltekit:layout> pseudo element then replace it with a proper layout component in the compiling process?

You can try this :
Let's say, we have index.svelte /product.svelte that inherit from __layout.svelte
both index.svelte /product.svelte contain the same thing except  :sweat_smile::sweat_smile: let' say
 Hero Header

You can create a component for example display.svelte with the following code
<slot name="hero"> </slot>
// This will render the content of an element that have slot="hero" as props otherwise it will render nothing "blank"

and call this component in the __layout.svelte as the following :
So your __layout.svelte will be like this :

  <navBar />
   <Display />
  <slot>
 // rest of content
</slot>

To display the
 Hero Header
 in your index.svelte and not in  /product.svelte you have to add this :

+++
<Display>

 Hero Header

</Display>
+++

in your  index.svelte

yes, recently it's becoming much worse, my project accumulates many conditions to check the current page URL in different components.
+layout.svelte, SideBar.svelte, NavigationBar.svelte all this should be changed depending on the current page, and logic currently smashed across the project.

@stalkerg have you considered creating a store and writing the component to the store in +page.js?

I actually am currently facing the issue myself (again).
I have a NavigationBar.svelte, which describes a general navigation, which is valid everywhere regardless of page, in my application.
Now I have a set of Calendar objects. These resulted in a sub-route called /calendar, which - depending on the parameter - can be a day, week, month or year view of the calendar. Since you can switch the views, I have a Calendar-related navigation, that I'd like to include in the NavigationBar.svelte as a slot - which I successfully did.
However: I only need the CalendarNavigationBar.svelte if we are actually in /calendar to begin with. Hence the +layout.svelte would be the perfect place to enrich the NavigationBar.svelte with the CalendarNavigationBar.svelte toolbar. Since it's part of a "flex-row" (the left part, the right part is the user login box, which comes from the NavigationBar.svelte itself), I have to include it inside the generic navigation rather than "under" it.

In the screenshot the "Day, Week, Month, Year" buttons are from `CalendarNavigationBar` (red rectangle) while the login box comes from the `NavigationBar` (orange box).
I'd like to have the generic +layout.svelte provide the NavigationBar (and <slot />) and the calendar/+layout.svelte provide the CalendarNavigationBar, which I'd assign a placeholder slot (e.g. "toolbar"), that has been previously defined in +layout.svelte.
Sadly this does not seem to be possible. I probably could have an if-statement check whether we are in a /calendar-route and include it there, but it's by far not as flexible as it could've been.

@UltraCakeBakery generates programmatically components not really good (you also should warry about adding and removing from the store); also, it's not so flexible, you can't add extra elements around your component, everything should be inside.

@UltraCakeBakery generates programmatically components not really good (you also should warry about adding and removing from the store); also, it's not so flexible, you can't add extra elements around your component, everything should be inside.

I am not following you on "generates programmatically components" being "not really good".  I was refering to a previously discussed workaround that boiled down to <svelte:component this={$navigator.component} {...$navigator.props}>. Where $navigator is a writeable store, to which you pass imported components to from your page component load function and references to additional data for properties.
Why should I worry about adding and removing from the stores?
You can add as many elements inside your navigator component as you would like. I dont see how that is not flexible enough.
In my example you would not be generating components, you are mounting already imported /generated components only once.

Has this been abandoned? It would be a really useful feature to have - and in a lot of ways - is a pretty fundamental functional requirement for a lot of people.

I have this same issue - I've been trying to create a sidebar with multiple slots (one for the top content and one for everything after the sidebar and top content), and when I tried using a custom layout and including it, the transitions that I had before broke, since I think the page gets re-hydrated with this temp method.
Example:

Expand

<slot />

        <Menu />

        <slot name="top">

        </slot>

    <slot name="main"></slot>

<MainLayout>

Welcome to SvelteKit

Visit kit.svelte.dev to read the documentation

        Roadmap

</MainLayout>

<MainLayout></MainLayout>

    <MenuLink to="/" title="Home" />
    <MenuLink to="/roadmap" title="Roadmap" />

{title}

Adding another +1 to this. I was building at an absolutely blistering pace, but then hit a major wall with this. Such a shame. Please implement ASAP

Is this being implemented? Multiple slots would be super useful.

Hey, just ran into this problem myself - Would be very nice to have indeed.
I am looking for a way how I can have an element like a NavBar inside a +layout.svelte file, but insert (optional) elements into it from any +page.svelte file.

We are looking for the exact same thing! We do know this from Twig and its super useful.
Inherit +layout.svelte and add additional information via named slots.
Would be awesome to have:

a) extend a slot and leave parent information as is {keep parent}
b) or completely overwrite a named slot and replace its content.

This is how this looks in Twig: https://twig.symfony.com/doc/3.x/functions/parent.html

Would be important to address all named slots in the inheritance.

Example on how this could look like:

/+layout.svelte

<slot="header">Parent header</slot>
<slot />
<slot="footer"> HTML with Inner footer Tag - Parent footer</slot>

/subfolder/+layout.svelte

<slot="header">My custom header</slot>
<slot="content">Layout Content</slot>
This goes into the unnamed slot in order of appearance 01.
This goes into the unnamed slot in order of appearance 02.

/subfolder/sub2/+page.svelte

  <slot="header">My final custom header overwriting all others</slot>

This is the main content but not slow

  <slot="content">Additional info keep parent content at the end {{parent() }}</slot>
  <slot="newslot">
New slot added in proper order
</slot>
  <slot="footer">{{ parent() }} Additional info to footer, but keep parent information before.

This method allows specific parts of the layout in a page to be overridden without affecting the rest of the structure.

I'm really surprised this isn't a feature of Svelte, yet. This is perfectly logical and it's really disappointing to learn that I can't do named slots inside of a layout. You're really going to make us write a wrapper component with named slots to get a sidebar layout? It sure does make a lot more sense to me to be able to have a folder structure in routes like:
├ +layout.svelte
├ (sidebar)/
│ ├ profile/
│ ├ settings/
│ └ +layout.svelte
├ (feature)/
│ ├ new/
│ ├ sale/
│ └ +layout.svelte
└ (landing)/
  ├ welcome/
  └ +layout.svelte

Is this being implemented? Multiple slots would be super useful.

the most recently created issue (9024) that was after this feature was closed with the reason of 'not planned', so sadly it seems like not anytime soon

Nothing on this ? :/ TO be honest this is better than snapshots and the newest features.. This should be prioritized...

Adding another +1 to this, especially in the absence of a reliable way to load static information (not data!) from child routes.
Remix, for example, doesn't have named slots - but they do have the handle system to allow you to easily load child information in a parent layout and set titles, content, etc appropriately. https://remix.run/docs/en/v1/route/handle
In the absense of both a way to access child routes and a named slot system, the only option left is to shoehorn static data into load function return values, which is inelegant and breaks libraries that use their own loaders, such as Houdini.

our solution to this problem is relatively simple,
you can opt out of the layout by adding @ to the page file name for example +page@.svelte
and then in the page you can do something like this

<Layout {data}>

</Layout>

and in the +layout.svelte use named slots like normal
<slot name="x" />

  <slot/>

hope this helps someone !

@nazihahmed could you explain how it worked in your project? because unfortunately it doesn't work for me

@nazihahmed Unfortunately, this will still inherit the root layout, so by default you'd get the layout inside itself.
One can work around this by having an empty root layout and then grouping the rest of the routes inside a group:
routes/+layout.svelte
<slot/>

routes/(haslayout)/+layout.svelte

  Always-on nav stuff here
  <slot name="nav" />

  <slot/>

routes/(haslayout)/routewithextranav/+page@.svelte <- this now uses the empty root layout

<Layout {data}>

    Hey! More stuff in the nav!

    Rest of the page goes here.

</Layout>

I find it somewhat annoying having to use a group like that, but it seems to be the easiest workaround for now.
Of course, if you're already using groups, you can just reference an empty layout from your existing group hierarchy instead of moving everything around (ie. routes/(authenticated)/admin/+layout@(authenticated).svelte would use the routes/(authenticated)/+layout.svelte layout or, importantly, an empty one if it doesn't exist).

Just bike shedding here, but <svelte:head> like syntax, e.g. <svelte:slot name="xxx"> might make sense for this use case.

@nazihahmed Unfortunately, this will still inherit the root layout, so by default you'd get the layout inside itself. One can work around this by having an empty root layout and then grouping the rest of the routes inside a group:
routes/+layout.svelte
<slot/>

routes/(haslayout)/+layout.svelte

  Always-on nav stuff here
  <slot name="nav" />

  <slot/>

routes/(haslayout)/routewithextranav/+page@.svelte <- this now uses the empty root layout

<Layout {data}>

    Hey! More stuff in the nav!

    Rest of the page goes here.

</Layout>

I find it somewhat annoying having to use a group like that, but it seems to be the easiest workaround for now.

How do you guys deal with the +layout.server.ts? You would have to redo everything in the +page.server.ts and pass it over to the imported Layout component?
I guess it would still be nice if there were a proper feature for this.

FWIW, I had the solution in https://github.com/sveltejs/kit/issues/627#issuecomment-1458539744 for some time in my code until I introduced groups, e.g. (group1)/ and (grroup2)/ then this doesn't work anymore:
The link component works when your access group1 in your browser but once you navigate to group2, the link from both groups can be seen at the same time/kind of overlap.
Tried few work-arounds before I wrote this but couldn't find a good solution yet.

Vielen Dank für die Nachricht – leider bin ich zur Zeit jedoch nicht im Büro. In dringenden Fällen bin ich telefonisch, ab dem 22.08. auch wieder normal erreichbar.
Viele Grüße
Silvan Händeler
–––
Silvan Händeler, Visuelle Kommunikation
+49 170 5 22 55 38
www.silvanhaendeler.com
Bürozeiten: Montag bis Freitag, 10–18 Uhr

Marked the majority of comments as 'off-topic' because most of them boil down to '+1'.
Please resist the urge to add comments along the lines of 'I also want this' or 'why isn't this done yet' or 'here's my use case, which is basically identical to all the other use cases that have already been mentioned'! You're not just making the thread harder to follow without adding useful information, you're actually harming your cause — a simple 👍 reaction on the OP of a GitHub issue thread carries more weight than a redundant comment, because those reactions can be used as a sorting mechanism. (Granted, this is already the top-reacted thread.)
With that out of the way:
Why this isn't supported yet
Allowing named slots in layouts would require that we had a mechanism for 'passing' slots to components. Effectively we need to be able to represent this concept...
<slot name="sidebar" />
<slot />

<Layout data={...}>

    ...

the content

</Layout>

...without knowing ahead of time what goes inside <Layout>:
<Layout data={...}>
  <Page $$slots={???} />
</Layout>

Right now, there's just no mechanism to do that in Svelte itself. It's something we'd like to add, but the bulk of our energy over the last year or so has been directed towards SvelteKit, and we're just now working through the backlog of Svelte PRs so that we're in a position to start thinking about major new features like this. It'll happen, but it won't happen overnight.
Why you probably don't need it anyway
$page.data contains all the data returned from your load functions, and allows you to use page data in a layout:
// src/routes/some/deeply/nested/+page.js
export function load() {
  return {
    message: 'hello from all the way down here'
  };
}

{$page.data.message ?? '...'}

You can define App.PageData in your src/app.d.ts to provide type safety around $page.data.
If you're using universal load functions instead of (or alongside) server load functions — i.e. +page.js rather than +page.server.js — you can return components as well as data, which means you can easily do this sort of thing:
import links from './Links.svelte';

export function load() {
  return { links }
}

  ...

  <svelte:component this={$page.data.links} />

It's not quite as idiomatic as slot="links" would be, but it should give you all the power you need. Here's a demo.

While this works for data, it doesn't work for scenarios where you're trying to insert something into the layout above. For example I have a page with a layout that has a navigation bar. On the layout we have a heading, and then the content below. For each page I would like to change the heading. Our design means the heading can't be in the child page.. it's like
Heading Text
NavBar                 Content
So we were hoping to have the heading pushed up from the child page.
I'm reasonably new to svelte, so there could be a more "svelte-y" way to do this than the slots, happy to be educated

@Rich-Harris Thanks for your sample and detailed explanation. I'm using a CSR app only and so I'm not so sure this approach works (page data is always null, but still debugging).  Regardless coming from multiple experiences with different frameworks this doesn't feel idiomatic at all. I have a super simple app with a sidebar (drawer) and having a named sidebar slot in this case seems very intuitive.
I am finding myself really digging through samples finding solutions. It would be great if features like this one could be showcased in a common but simple starter app.

[...]
How do you guys deal with the data or code that would normally get loaded in the +layout.server.ts? You would have to re-do all that in each+page.server.ts and pass it over to the imported Layout component right (which is clearly not an acceptable solution)?

I do it the same way as before, still in the top +layout.server.ts. The data is inherited by child layouts.

This will be solved through snippets in Svelte 5: https://www.sveltelab.dev/hd0z3oisqttk8tx

This will be solved through snippets in Svelte 5: https://www.sveltelab.dev/hd0z3oisqttk8tx

The "snippet" and the counterpart "render" seem extremely promising as highlighted in the Svelte Summit talk.
As we all know naming things is the hardest part in software engineering, so my initial reaction to the name "snippet" is that the connotation of a small code part (a snippet) may not (or may, depending on the intentions) imply the use of this framework feature for certain scenarios. If it would be intended for small code parts the name would be perfectly fine.
On the other hand if this is the "new and better slot" feature, it would be used (definitely has the potential to) for larger pieces of code that allows us to structure code e.g. within +layouts, which this issue was originally all about. In this context the name snippet might be a bit misleading especially for new users.
My first thoughts in this context would be names like "part", "piece" or "extract" which would nicely coexist with the render counterpart and make less assumptions about the size of code the feature is intended to handle.
But that's just naming — the idea seems really great and certainly tops my wish-list!

This will be solved through snippets in Svelte 5, if SSR is not a concern for you

You know... I think we could solve this in SSR. Thinking aloud (apologies if this idea has already been presented, but this thread is too long to re-read in its entirety right now!) — perhaps if we had something like this...
src/routes/
  some-route/
    +page.svelte
    +page-footer.svelte
    +page-header.svelte
  +layout.svelte

...and the layout looked like this...

  {#if header}
    {@render header()}
  {:else}

  {/if}

{@render children()}

  {#if footer}
    {@render footer()}
  {:else}

  {/if}

...we could make it work?

Find a solution in https://stackoverflow.com/a/71672937/4037224

This will be solved through snippets in Svelte 5, if SSR is not a concern for you: https://www.sveltelab.dev/hd0z3oisqttk8tx
In SSR this likely won't work because the child sets the context after the parent has rendered.

That's a very nice solution. But that makes me think, why wouldn't the same thing work in Svelte 4/earlier as well?
Instead of the setting the layout state it to a @snippet in the child page (through the context setter), just set it to a component instead and render it using <svelte:component>. I think this solution is even better than passing components using $page.data and loaders.
You can even pass props using that same context!
Demo: https://www.sveltelab.dev/uqcbqnbimjsb880

Will snippets in Svelte 5 solve this issue?

I think they should, but I'm not sure how. Workout anything special needed, a layout can do something like this:
// +layout.svelte

    {@render slots.header}

    <slot/>

    {@render slots.footer}

And the page:

{#snippet header()}
    ...
{/snippet}

This works, but I would love to see a better mechanism for this, that ensures all slots are loaded/unloaded at the same time, as they normally would in a component. One idea would be that top-level snippets in a page are passed as slots, but I think wouldn't be too great.
Additionally, since slots are now just snippets (plain JS values) passed as props, it would be nice to be able to easily pass any data from the page to the layout. One idea might be a designated export const value is passed as props to the layout. Then, this would be very easy to do:
// +page.svelte

export const layoutProps = {
    header, // snippet
    other: 5, // arbitrary value
}

Could even be made reactive with export const x = $state({ ...})

https://github.com/sveltejs/kit/issues/627#issuecomment-1813212980 Is this solution implemented on the kit code base?

https://github.com/sveltejs/kit/issues/627#issuecomment-2099273138 Passing snippets from children pages/layouts to parent layouts using a context like this works well in simple cases, but it quickly becomes trickier if you want to properly handle reverting to parent snippets when unmounting nested routes/layouts.

Based on https://github.com/sveltejs/kit/issues/627#issuecomment-2181640503, I implemented a wrapper for the Context API that allows you to get & set only the last element of a property, and supports dynamic properties.

    {@render dashboard.header?.()}

    {@render dashboard.sidebar?.()}

    {@render children()}

    {@render dashboard.footer?.()}

{#snippet header()}

Some header

{/snippet}

{#snippet sidebar()}

Some links

{/snippet}

{data.project.title}

Internally, it works by keeping an internal object with stacks, and by returning a Proxy for end user consumption.

import { getContext, onDestroy, setContext } from 'svelte';

type RecordStack<V> = { [P in string]: Array<V> }

export function setStackContext<V>(key: string, context: Record<string, V>) {
  const internalRecordStack = $state(createRecordStackFrom<V>(context));

  const proxy = setContext(Symbol.for(key), createPublicProxyFor<V>(internalRecordStack))

  return proxy;
}

function createRecordStackFrom<V>(context: Record<string, V>) {
  return Object.entries(context).reduce((acc, [k, v]) => {
    acc[k] = [v];
    return acc;
  }, {} as RecordStack<V>);
}

function createPublicProxyFor<V>(internalRecordStack: RecordStack<V>) {
  return new Proxy(internalRecordStack, {
    get(target, propertyKey, receiver) {
      if (typeof propertyKey === 'symbol') return Reflect.get(target, propertyKey, receiver);

      return Reflect.get(internalRecordStack, propertyKey, receiver)?.at(-1);
    },
    set(target, propertyKey, value, receiver) {
      if (typeof propertyKey === 'symbol') return Reflect.set(target, propertyKey, value, receiver);

      if (!(propertyKey in target)) {
        Reflect.set(target, propertyKey, [], receiver);
      }
      const stack = Reflect.get(target, propertyKey, receiver);
      stack.push(value);

      onDestroy(() => stack.pop());

      return true;
    },
  }) as Record<string, V>;
}

export function getStackContext<V>(key: string) {
  return getContext<ReturnType<typeof setStackContext<V>>>(Symbol.for(key))
}

authors: 205g0 AdaptingAFM Aias Bandit Bishwas-py Cybolic DoisKoh JugurthaMoad Nick-Mazuk Palmik RedstoneWizard08 Rich-Harris SlickNicky10 UltraCakeBakery benmccann brandonbuttars cmolina codepainting cowboycodr divStar dmvvilela dummdidumm enisbudancamanak fnimick iolyd jameswoodley jrhager84 kahverengi001 martinjeromelouis mohe2015 nazihahmed newlegendmedia niemyjski np-nam rChaoz raphael-devel richarddavenport rogadev silllli stalkerg teddarcuri terwer timephy wfendler


text:
(throw) Redirect doesn't work on full page loads

Describe the bug
Redirect thrown in load functions work precisely and expectedly when navigated to that respective page/route through clicking the link/a-tag navigation, but weirdly that isn't the case when we full load the page or reload the page, it kind of stops working or breaks the app.
My reproduction kind of demonstrates that.(try changing the logic of redirect & go to /dashboard through entering the url and not by clicking the button  )
Reproduction
demo-app-repo and the reproduction website
Logs
No response
System Info
System:
    OS: Linux 5.15 Ubuntu 20.04.5 LTS (Focal Fossa)
    CPU: (16) x64 AMD EPYC 7B13
    Memory: 30.63 GB / 62.80 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.19.0/bin/yarn
    npm: 8.19.3 - ~/.nvm/versions/node/v16.19.0/bin/npm
  npmPackages:
    @sveltejs/adapter-auto: ^1.0.3 => 1.0.3
    @sveltejs/adapter-netlify: ^1.0.5 => 1.0.5
    @sveltejs/kit: ^1.12.0 => 1.12.0
    svelte: ^3.57.0 => 3.57.0
    vite: ^4.2.0 => 4.2.0

Severity
serious, but I can work around it
Additional Information
I use github codespaces , kind of suspicious it has something to do with this but not sure.
Sorry in advance if this a poor one 😅, thanks!

You're using redirect status code 300. This means that the user agent (aka the browser) has to somehow chose the right destination, which in practise I don't know how it works frankly. It works when navigating via button click because the redirect status code has no meaning in that situation.
Choose a more appropriate status code and it should work as expected.

You're using redirect status code 300. This means that the user agent (aka the browser) has to somehow chose the right destination, which in practise I don't know how it works frankly - but apparently the browser does nothing in this case. It works when navigating via button click because the redirect status code has no meaning in that situation.
Choose a more appropriate status code (302, 303 or 307) and it should work as expected.

Oh, okay I'll try the things out

@dummdidumm  hey, thanks it worked, but I kind of explored the different status code and saw that 301 & 308 which are permanently moved redirect status codes do work but even if I change it to anything else (bcoz If I had done it unknowningly/mistakenly) then it still redirects me, no matter what condition or status code is there  it redirects everytime, to solve this I had to delete the build& .svelte-kit folder and it worked fine , is this a bug? It might need to be reviewed

If you had previously sent a 301 Moved Permanently, the browser will cache that. It will perform the redirect without even calling the server unless you clear the browser's cache.

If you had previously sent a 301 Moved Permanently, the browser will cache that. It will perform the redirect without even calling the server unless you clear the browser's cache.

Oh, thanks I missed that one.

authors: Conduitry Devr-pro dummdidumm


text:
Intercepting Routes

Describe the problem
https://beta.nextjs.org/docs/routing/intercepting-routes Similar to NextJS feature. It would be awesome if we could use this in sveltekit.
Describe the proposed solution
As above
Alternatives considered
No response
Importance
nice to have
Additional Information
No response

My initial gut feeling is 😱 we've gone too far 😱
Looking at the modal example, I'm still not sure exactly how it works, and I'm extra sure I wouldn't know how it worked at all if I stumbled upon it in a codebase and didn't have the whole explainer to go along with it.
That being said, I think there is room for some neat features around something like this. I particularly like the parallel routes implementation. I'll personally have to think about it a bit more.

this has been implemented now, a little while ago too so I think I can close this

authors: bobbymannino tcc-sejohnson


text:
Documentation not clear on autoresize feature in the textarea type of the Input component

I think the documentation can be a little bit more specific on how to make the autoresize work, it seems like the code should work right out of the box but the example does not have specified on how to use certain vairables. Am I missing something?

@lungarella-raffaele A PR has been opened to address this issue. Hope this helps!

authors: lungarella-raffaele msmauric

repo: sveltestrap/sveltestrap


text:
Maintainer needed

This repo deserves more care and maintenance than I'm able to provide. If anyone's willing to step up, I'm sure the community would be grateful :)

Hi I am willing to work on it, but currently I have not much idea about how to contribute

Hi @nerdatom ! Thank you, being a maintainer doesn't require active contribution. Responding to issues and PRs are as important as active contributions. Let me know if are still interested and I'll add you as a collaborator 👍

Hi, Sven
It will be great for me to contribute to issues and PRs. Please add me as a
collaborator. Please use this username for adding me as collaborator.
https://github.com/Anulesh
On Wed, Sep 12, 2018 at 11:05 AM, Sven Anders Robbestad <
notifications@github.com> wrote:

Hi @nerdatom https://github.com/nerdatom ! Thank you, being a
maintainer doesn't require active contribution. Responding to issues and
PRs are as important as active contributions. Let me know if are still
interested and I'll add you as a collaborator 👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/svenanders/react-breadcrumbs/issues/127#issuecomment-420517895,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AiCN5Qa6EZLayWooznUhddqn0VAv0LXZks5uaJ0EgaJpZM4Uie4G
.

Hi this is nerdatom with different login. You can add this user as a collaborator.

authors: Anulesh nerdatom svenanders

repo: svenanders/react-breadcrumbs

license: isc


text:
#emptyFieldValue: not respected with #recordClass:

If #recordClass: is set, #emptyFieldValue: is ignored and nil values are stored.

I am really in dubio about this. Right now the code in #readNextRecordAsObject seems to have been written to not assign empty fields to objects. The more I think about this, the more this makes sense, because a single value cannot be the default for all your fields. It seems better to solve unassigned properties inside the object itself.
Does this make sense ?

authors: seandenigris svenvc

repo: svenvc/NeoCVS


text:
Webpack 5 | Error: Plugin name should be specified

Hello,
Is SVGO-Loader compatible with Webpack 5?
I got this error when I build my js.
ERROR in ./src/img/icons/viadeo.svg
Module build failed (from ./node_modules/svgo-loader/index.js):
Error: Plugin name should be specified
    at resolvePluginConfig (node_modules/svgo/lib/svgo/config.js:98:13)
    at node_modules/svgo/lib/svgo.js:46:7
    at Array.map (<anonymous>)
    at optimize (node_modules/svgo/lib/svgo.js:45:37)
    at Object.loader (node_modules/svgo-loader/index.js:12:18)
 @ ./src/img/icons/ sync \.svg$ ./viadeo.svg
 @ ./src/js/app.js 14:11-58

Here my loader configuration :
test: /icons\/.*\.svg$/,
  use: [
    {
      loader: 'svg-sprite-loader',
      options: {
        extract: true,
        publicPath: 'img/icons/',
        spriteFilename: svgPath => `icons${svgPath.substr(-4)}`,
        symbolId: filePath => `icon-${path.basename(filePath).slice(0, -4)}`,
      },
    },
    {
      loader: 'svgo-loader',
    },
  ],

Weird, I don't get this error anymore.

when you set svgo to 2.3.0, svgo-loader to 3.0.0，svgo-loader config must change
webpack before
loader: 'svgo-loader',
options: {
  plugins: [
    {"cleanupAttrs": true},
    {"cleanupEnableBackground": true},
    ... ,
    {
      "removeAttrs": {
        "attrs": ["fill", "fill-rule", "path:fill", "path:class"]
      }
    }
  ]
}

webpack after
loader: 'svgo-loader',
options: {
  plugins: [
    {"name": "cleanupAttrs"},
    {"name": "cleanupEnableBackground"},
    ... ,
    {
      "name": "removeAttrs",
      "params": {
        "attrs": ["fill", "fill-rule", "path:fill", "path:class"]
      }
    }
  ]
}

repo: svg/svgo-loader